]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
stop warning each time we check minimum-dir-info
authorRoger Dingledine <arma@torproject.org>
Thu, 19 Feb 2015 11:27:14 +0000 (06:27 -0500)
committerRoger Dingledine <arma@torproject.org>
Thu, 19 Feb 2015 11:27:14 +0000 (06:27 -0500)
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

index 29f00ac5d72a12987f4beaaa616f3a9ca5af346c..23d7a06e173fa2daa14fd4fd485b9c6bcd9758e2 100644 (file)
@@ -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);