diff options
author | Peter Palfrader <peter@palfrader.org> | 2007-07-12 15:58:03 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2007-07-12 15:58:03 +0000 |
commit | f64a5b71e05be8712ed77dae907288cd2ffbc7d9 (patch) | |
tree | 6792dcc38da014f3146f14a875423be13a0c0018 /src/or | |
parent | 0bea370d3c29415ea85a2f772413c4f96cb0f872 (diff) | |
download | tor-f64a5b71e05be8712ed77dae907288cd2ffbc7d9.tar.gz tor-f64a5b71e05be8712ed77dae907288cd2ffbc7d9.zip |
Backport r10799
svn:r10800
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerlist.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 8ed70a1c1d..5322cf1aca 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1902,8 +1902,11 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, 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_add_to_routerlist(routerinfo_t *router, const char **msg, 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; |