From: Nick Mathewson Date: Thu, 16 Apr 2015 15:15:29 +0000 (-0400) Subject: Merge remote-tracking branch 'arma/ticket8766' X-Git-Tag: tor-0.2.7.1-alpha~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f152081de174fbd0e097e97d7d76d6b401dcd194;p=thirdparty%2Ftor.git Merge remote-tracking branch 'arma/ticket8766' --- f152081de174fbd0e097e97d7d76d6b401dcd194 diff --cc src/or/main.c index 07d5ba883f,a299f9886b..d0ed529687 --- a/src/or/main.c +++ b/src/or/main.c @@@ -1202,7 -1199,43 +1200,42 @@@ get_signewnym_epoch(void return newnym_epoch; } - static time_t time_to_check_descriptor = 0; + typedef struct { + time_t last_rotated_x509_certificate; + time_t check_v3_certificate; + time_t check_listeners; + time_t download_networkstatus; - time_t shrink_memory; + time_t try_getting_descriptors; + time_t reset_descriptor_failures; + time_t add_entropy; + time_t write_bridge_status_file; + time_t downrate_stability; + time_t save_stability; + time_t clean_caches; + time_t recheck_bandwidth; + time_t check_for_expired_networkstatus; + time_t write_stats_files; + time_t write_bridge_stats; + time_t check_port_forwarding; + time_t launch_reachability_tests; + time_t retry_dns_init; + time_t next_heartbeat; + time_t check_descriptor; + /** When do we next launch DNS wildcarding checks? */ + time_t check_for_correct_dns; + } time_to_t; + + static time_to_t time_to = { 0 }; + + /** Reset all the time_to's so we'll do all our actions again as if we + * just started up. + * Useful if our clock just moved back a long time from the future, + * so we don't wait until that future arrives again before acting. + */ + void reset_all_main_loop_timers(void) { + memset(&time_to, 0, sizeof(time_to_t)); + } + /** * Update our schedule so that we'll check whether we need to update our * descriptor immediately, rather than after up to CHECK_DESCRIPTOR_INTERVAL