diff options
author | Roger Dingledine <arma@torproject.org> | 2007-06-15 02:12:15 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-06-15 02:12:15 +0000 |
commit | 3d641bde0e6d86f924252ae0f7cd427212ef937e (patch) | |
tree | 67aed855134ca951ad8661d83069d920a39095fa /src/or/circuitbuild.c | |
parent | 4398a0991033331de7df5f07df7384e8b8550418 (diff) | |
download | tor-3d641bde0e6d86f924252ae0f7cd427212ef937e.tar tor-3d641bde0e6d86f924252ae0f7cd427212ef937e.tar.gz |
Refine r10571: more work on bridge stuff.
- Only listen to responses for "authority" fetches if we're configured
to use Bridges. Otherwise it's safe (and maybe smarter) to silently
discard them like we used to.
- React faster to download networkstatuses after the first bridge
descriptor arrives.
- Don't do dir fetches before we have any bridges, even when our
dirport is open.
svn:r10604
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index a58c68d19..f505ae03f 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1728,11 +1728,7 @@ extend_info_alloc(const char *nickname, const char *digest, { extend_info_t *info = tor_malloc_zero(sizeof(extend_info_t)); memcpy(info->identity_digest, digest, DIGEST_LEN); - if (nickname) - strlcpy(info->nickname, nickname, sizeof(info->nickname)); - else { - /* make one up */ - } + strlcpy(info->nickname, nickname, sizeof(info->nickname)); if (onion_key) info->onion_key = crypto_pk_dup_key(onion_key); info->addr = addr; @@ -2751,9 +2747,12 @@ learned_bridge_descriptor(routerinfo_t *ri) tor_assert(ri); tor_assert(ri->purpose == ROUTER_PURPOSE_BRIDGE); if (get_options()->UseBridges) { + int first = !any_bridge_descriptors_known(); ri->is_running = 1; add_an_entry_guard(ri); log_notice(LD_DIR, "new bridge descriptor '%s'", ri->nickname); + if (first) + routerlist_retry_directory_downloads(time(NULL)); } } |