[or-cvs] r10800: Backport r10799 (tor/branches/tor-0_1_2-patches/src/or)

weasel at seul.org weasel at seul.org
Thu Jul 12 15:58:04 UTC 2007


Author: weasel
Date: 2007-07-12 11:58:03 -0400 (Thu, 12 Jul 2007)
New Revision: 10800

Modified:
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
Backport r10799

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-07-12 15:57:23 UTC (rev 10799)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-07-12 15:58:03 UTC (rev 10800)
@@ -1902,8 +1902,11 @@
   int authdir = get_options()->AuthoritativeDir;
   int authdir_believes_valid = 0;
   routerinfo_t *old_router;
-  /* This has side effects, so do it before we start the real work */
-  int have_dir_info = router_have_minimum_dir_info();
+  /* router_have_minimum_dir_info() has side effects, so do it before we
+   * start the real work */
+  int authdir_may_warn_about_unreachable_server =
+    authdir && !from_cache && !from_fetch &&
+    router_have_minimum_dir_info();
 
   tor_assert(msg);
 
@@ -1996,8 +1999,7 @@
         router->num_unreachable_notifications =
           old_router->num_unreachable_notifications;
       }
-      if (authdir && !from_cache && !from_fetch &&
-          have_dir_info &&
+      if (authdir_may_warn_about_unreachable_server &&
           dirserv_thinks_router_is_blatantly_unreachable(router, time(NULL))) {
         if (router->num_unreachable_notifications >= 3) {
           unreachable = 1;



More information about the tor-commits mailing list