]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
avoid sending a request for "keys/fp" (for which we'll get a 400 bad
authorRoger Dingledine <arma@torproject.org>
Sun, 4 Nov 2007 02:06:09 +0000 (02:06 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 4 Nov 2007 02:06:09 +0000 (02:06 +0000)
request) if we need more v3 certs but we've already got pending requests
for all of them.

svn:r12370

src/or/routerlist.c

index 95e048cb779a787b5e27f3988485a93f57f6d6b0..93369e157e2442de93a755a8f0740791d75a41e4 100644 (file)
@@ -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));