diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-15 23:44:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-15 23:44:32 +0000 |
commit | 9b3957e7553d053643fb0f73848493c906c78230 (patch) | |
tree | da4fa6c2e4e6578df73308f56a592dc1bc3cf51c /src | |
parent | 3ad6dc0e2e91e094e082e767c71e6e1d91f5fca0 (diff) | |
download | tor-9b3957e7553d053643fb0f73848493c906c78230.tar tor-9b3957e7553d053643fb0f73848493c906c78230.tar.gz |
r15809@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.
svn:r11958
Diffstat (limited to 'src')
-rw-r--r-- | src/or/networkstatus.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index d980cc748..672b1fbc5 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1012,20 +1012,23 @@ routers_update_all_from_networkstatus(time_t now) 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 @@ routers_update_all_from_networkstatus(time_t now) } } - 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 ? |