[or-cvs] r11958: Do not call the more interesting parts of routers_update_all (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Mon Oct 15 23:44:32 UTC 2007


Author: nickm
Date: 2007-10-15 19:44:32 -0400 (Mon, 15 Oct 2007)
New Revision: 11958

Modified:
   tor/trunk/
   tor/trunk/src/or/networkstatus.c
Log:
 r15809 at catbus:  nickm | 2007-10-15 19:44:13 -0400
 Do not call the more interesting parts of routers_update_all_from_networkstatus if there is no live networkstatus.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r15809] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2007-10-15 23:15:24 UTC (rev 11957)
+++ tor/trunk/src/or/networkstatus.c	2007-10-15 23:44:32 UTC (rev 11958)
@@ -1012,20 +1012,23 @@
   routerlist_t *rl = router_get_routerlist();
   networkstatus_vote_t *consensus = networkstatus_get_live_consensus(now);
 
-  router_dir_info_changed();
+  router_dir_info_changed(); /*XXXX020 really? */
 
   if (networkstatus_v2_list_has_changed) {
     routerstatus_list_update_from_v2_networkstatus();
     networkstatus_v2_list_has_changed = 0;
   }
 
+  if (!consensus)
+    return;
+
   routers_update_status_from_consensus_networkstatus(rl->routers, 0);
   SMARTLIST_FOREACH(rl->routers, routerinfo_t *, ri,
                     ri->routerlist_index = ri_sl_idx);
   entry_guards_compute_status();
 
   me = router_get_my_routerinfo();
-  if (me && consensus && !have_warned_about_invalid_status) {
+  if (me && !have_warned_about_invalid_status) {
     routerstatus_t *rs = networkstatus_vote_find_entry(consensus,
                                         me->cache_info.identity_digest);
 
@@ -1042,7 +1045,7 @@
     }
   }
 
-  if (consensus && !have_warned_about_old_version) {
+  if (!have_warned_about_old_version) {
     int is_server = server_mode(get_options());
     version_status_t status;
     const char *recommended = is_server ?



More information about the tor-commits mailing list