diff options
author | Linus Nordberg <linus@torproject.org> | 2013-06-05 15:48:57 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2013-06-10 23:04:20 +0200 |
commit | c132427db4f207a32e4abaae0e070840e5e2b808 (patch) | |
tree | 28d81236ea9caf20012746e87fe21a1a88b9a140 /src/or | |
parent | 4d54b9774d11f47c6a670ab9b380e027a524f5f9 (diff) | |
download | tor-c132427db4f207a32e4abaae0e070840e5e2b808.tar.gz tor-c132427db4f207a32e4abaae0e070840e5e2b808.zip |
Hide consensus download interval, depending on TestingTorNetwork, in a macro.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index 9e4efefdbb..b2ff62879b 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1450,11 +1450,10 @@ run_scheduled_events(time_t now) /* How often do we check whether we should download network status * documents? */ -#define CHECK_NETWORKSTATUS_DOWNLOAD_INTERVAL (60) +#define networkstatus_dl_interval(o) ((o)->TestingTorNetwork ? 1 : 60) if (time_to_download_networkstatus < now && !options->DisableNetwork) { - time_to_download_networkstatus = now + - options->TestingTorNetwork ? 1 : CHECK_NETWORKSTATUS_DOWNLOAD_INTERVAL; + time_to_download_networkstatus = now + networkstatus_dl_interval(options); update_networkstatus_downloads(now); } |