diff options
author | Roger Dingledine <arma@torproject.org> | 2007-11-04 02:06:09 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-11-04 02:06:09 +0000 |
commit | 5bf61633e3c44ad65a91d90c4002475ddd5ef8e4 (patch) | |
tree | ecb83d6b7421375b791106c3af3036b0a9fb0f3e /src | |
parent | 9ef72079aedc30869cbea600066ea641f0ca213b (diff) | |
download | tor-5bf61633e3c44ad65a91d90c4002475ddd5ef8e4.tar.gz tor-5bf61633e3c44ad65a91d90c4002475ddd5ef8e4.zip |
avoid sending a request for "keys/fp" (for which we'll get a 400 bad
request) if we need more v3 certs but we've already got pending requests
for all of them.
svn:r12370
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 95e048cb77..93369e157e 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -367,6 +367,12 @@ authority_certs_fetch_missing(networkstatus_vote_t *status, time_t now) fp[HEX_DIGEST_LEN+1] = '\0'; smartlist_add(fps, fp); }); + if (smartlist_len(fps) == 1) { + /* we didn't add any: they were all pending */ + SMARTLIST_FOREACH(fps, char *, cp, tor_free(cp)); + smartlist_free(fps); + goto done; + } resource = smartlist_join_strings(fps, "", 0, NULL); resource[strlen(resource)-1] = '\0'; SMARTLIST_FOREACH(fps, char *, cp, tor_free(cp)); |