diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-10-13 13:16:12 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-10-13 13:16:12 -0400 |
commit | 1c6649418df97803daa53c1e6a83a61f4cc1b162 (patch) | |
tree | e13a673ff82a9058909267470a516987fc128ae1 | |
parent | a0c1c2ac012fded493c0d8c49fe57e56373b061f (diff) | |
download | tor-1c6649418df97803daa53c1e6a83a61f4cc1b162.tar.gz tor-1c6649418df97803daa53c1e6a83a61f4cc1b162.zip |
Revert accidentally-committed changes to routerlist.c
This reverts part of commit a0c1c2ac012fded493c0d8c49fe57e56373b061f.
-rw-r--r-- | src/or/routerlist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index bf2a5a5a45..43be8346cc 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3216,13 +3216,13 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, /* Make sure that we haven't already got this exact descriptor. */ if (sdmap_get(routerlist->desc_digest_map, router->cache_info.signed_descriptor_digest)) { - /* If we have this descriptor already but the new descriptor is a bridge + /* If we have this descriptor already and the new descriptor is a bridge * descriptor, replace it. If we had a bridge descriptor before and the * new one is not a bridge descriptor, don't replace it. */ - const int had_as_bridge = old_router && - old_router->purpose == ROUTER_PURPOSE_BRIDGE; - if (! routerinfo_is_a_configured_bridge(router) || - (router->purpose != ROUTER_PURPOSE_BRIDGE && had_as_bridge)) { + tor_assert(old_router); + if (! (routerinfo_is_a_configured_bridge(router) && + (router->purpose == ROUTER_PURPOSE_BRIDGE || + old_router->purpose != ROUTER_PURPOSE_BRIDGE))) { log_info(LD_DIR, "Dropping descriptor that we already have for router '%s'", router->nickname); |