diff --git a/cmd/common.go b/cmd/common.go index 63eb46e..ed5b178 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -167,7 +167,7 @@ func Main (argStateDir string, processCallback ctwatch.ProcessCallback) { ParallelFetch: *parallelFetch, Quiet: !*verbose, } - scanner := ctwatch.NewScanner(logUri, logKey, opts) + scanner := ctwatch.NewScanner(logUri, logKey, &opts) latestSTH, err := scanner.GetSTH() if err != nil { diff --git a/scanner.go b/scanner.go index 7191277..9619e69 100644 --- a/scanner.go +++ b/scanner.go @@ -287,11 +287,11 @@ func (s *Scanner) Scan(startIndex int64, endIndex int64, processCert ProcessCall // Creates a new Scanner instance using |client| to talk to the log, and taking // configuration options from |opts|. -func NewScanner(logUri string, publicKey crypto.PublicKey, opts ScannerOptions) *Scanner { +func NewScanner(logUri string, publicKey crypto.PublicKey, opts *ScannerOptions) *Scanner { var scanner Scanner scanner.LogUri = logUri scanner.publicKey = publicKey scanner.logClient = client.New(logUri) - scanner.opts = opts + scanner.opts = *opts return &scanner }