]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'arma/ticket8766'
authorNick Mathewson <nickm@torproject.org>
Thu, 16 Apr 2015 15:15:29 +0000 (11:15 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 16 Apr 2015 15:15:29 +0000 (11:15 -0400)
1  2 
src/or/circuitbuild.c
src/or/main.c

Simple merge
diff --cc src/or/main.c
index 07d5ba883f76ee557df1535bf7c99d61a0840d80,a299f9886b23daf26af728f9c60e3d145b2da204..d0ed5296874296ac5156a64dc45e894bf846fec1
@@@ -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