[tor-commits] [tor/master] Merge remote-tracking branch 'arma/ticket8766'

nickm at torproject.org nickm at torproject.org
Thu Apr 16 15:17:28 UTC 2015


commit f152081de174fbd0e097e97d7d76d6b401dcd194
Merge: cc10f13 5606197
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Apr 16 11:15:29 2015 -0400

    Merge remote-tracking branch 'arma/ticket8766'

 changes/ticket8766    |    7 ++
 src/or/circuitbuild.c |    4 ++
 src/or/main.c         |  188 ++++++++++++++++++++++++++-----------------------
 src/or/main.h         |    1 +
 4 files changed, 112 insertions(+), 88 deletions(-)

diff --cc src/or/main.c
index 07d5ba8,a299f98..d0ed529
--- 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





More information about the tor-commits mailing list