diff options
author | Roger Dingledine <arma@torproject.org> | 2021-10-28 20:53:26 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2021-10-28 20:57:28 -0400 |
commit | 867c3c6f89ae67bb95cc3c714feb7898dd3c8e3b (patch) | |
tree | 1d028fee06f77e0523fb4a9c3df7ce88329bfb97 /src/feature/nodelist | |
parent | d66549c20855b4d75b1a26f18c852327f6a75a05 (diff) | |
download | tor-867c3c6f89ae67bb95cc3c714feb7898dd3c8e3b.tar.gz tor-867c3c6f89ae67bb95cc3c714feb7898dd3c8e3b.zip |
only log "new bridge descriptor" if really new
The bridge descriptor fetching codes ends up fetching a lot of duplicate
bridge descriptors, because this is how we learn when the descriptor
changes.
This commit only changes comments plus whether we log that one line.
It moves us back to the old behavior, before the previous commit for
30496, where we would only log that line when the bridge descriptor
we're talking about is better than the one we already had (if any).
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/routerlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c index e64840b5dd..c00f7ffb26 100644 --- a/src/feature/nodelist/routerlist.c +++ b/src/feature/nodelist/routerlist.c @@ -1622,7 +1622,7 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, * let the bridge descriptor fetch subsystem know that we * succeeded at getting it -- so we can adjust the retry schedule * to stop trying for a while. */ - learned_bridge_descriptor(router, from_cache); + learned_bridge_descriptor(router, from_cache, 0); } log_info(LD_DIR, "Dropping descriptor that we already have for router %s", @@ -2054,7 +2054,7 @@ routerlist_descriptors_added(smartlist_t *sl, int from_cache) control_event_descriptors_changed(sl); SMARTLIST_FOREACH_BEGIN(sl, routerinfo_t *, ri) { if (ri->purpose == ROUTER_PURPOSE_BRIDGE) - learned_bridge_descriptor(ri, from_cache); + learned_bridge_descriptor(ri, from_cache, 1); if (ri->needs_retest_if_added) { ri->needs_retest_if_added = 0; dirserv_single_reachability_test(approx_time(), ri); |