[or-cvs] r10754: Call router_have_minimum_dir_info() at the beginning of rout (tor/trunk/src/or)

weasel at seul.org weasel at seul.org
Fri Jul 6 21:21:09 UTC 2007


Author: weasel
Date: 2007-07-06 17:21:09 -0400 (Fri, 06 Jul 2007)
New Revision: 10754

Modified:
   tor/trunk/src/or/routerlist.c
Log:
Call router_have_minimum_dir_info() at the beginning of router_add_to_routerlist() since it has side effects

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-07-06 18:40:39 UTC (rev 10753)
+++ tor/trunk/src/or/routerlist.c	2007-07-06 21:21:09 UTC (rev 10754)
@@ -2359,6 +2359,8 @@
   int authdir = authdir_mode(get_options());
   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();
 
   routerlist_check_bug_417();
   tor_assert(msg);
@@ -2454,7 +2456,7 @@
           old_router->num_unreachable_notifications;
       }
       if (authdir && !from_cache && !from_fetch &&
-          router_have_minimum_dir_info() &&
+          have_dir_info &&
           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