[tor-commits] [tor/master] stop warning each time we check minimum-dir-info

arma at torproject.org arma at torproject.org
Thu Feb 19 11:30:03 UTC 2015


commit 64d5e0e4171f9c45376cce26c4db349c1a114096
Author: Roger Dingledine <arma at torproject.org>
Date:   Thu Feb 19 06:27:14 2015 -0500

    stop warning each time we check minimum-dir-info
    
    We already log whenever our state changes, e.g. whenever new directory
    information arrives. This additional log_warn() will at best just add more
    log messages, or worse, make the user wonder what she needs to fix.
    
    (Changed after consultation with Yawning.)
---
 src/or/nodelist.c |   15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 29f00ac..23d7a06 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1670,8 +1670,6 @@ update_router_have_minimum_dir_info(void)
 
   using_md = consensus->flavor == FLAV_MICRODESC;
 
-#define NOTICE_DIR_INFO_STATUS_INTERVAL (60)
-
   /* Check fraction of available paths */
   {
     char *status = NULL;
@@ -1681,24 +1679,11 @@ update_router_have_minimum_dir_info(void)
                                                 &status);
 
     if (paths < get_frac_paths_needed_for_circs(options,consensus)) {
-      /* these messages can be excessive in testing networks */
-      static ratelim_t last_warned =
-        RATELIM_INIT(NOTICE_DIR_INFO_STATUS_INTERVAL);
-      char *suppression_msg = NULL;
-
       tor_snprintf(dir_info_status, sizeof(dir_info_status),
                    "We need more %sdescriptors: we have %d/%d, and "
                    "can only build %d%% of likely paths. (We have %s.)",
                    using_md?"micro":"", num_present, num_usable,
                    (int)(paths*100), status);
-
-      if ((suppression_msg = rate_limit_log(&last_warned, time(NULL)))) {
-        if (!should_delay_dir_fetches(options, NULL) &&
-            !directory_too_idle_to_fetch_descriptors(options, now)) {
-          log_warn(LD_NET, "%s%s", dir_info_status, suppression_msg);
-        }
-        tor_free(suppression_msg);
-      }
       tor_free(status);
       res = 0;
       control_event_bootstrap(BOOTSTRAP_STATUS_REQUESTING_DESCRIPTORS, 0);



More information about the tor-commits mailing list