cleanups, and remove some unreachable code.

svn:r5727
This commit is contained in:
Roger Dingledine
2006-01-04 06:43:03 +00:00
parent 485aa9415d
commit f8a59965a1
2 changed files with 6 additions and 13 deletions
+5 -6
View File
@@ -302,7 +302,7 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
return FP_REJECT;
} else if (!strcasecmp(fp_ent->nickname, "!invalid")) {
if (msg)
*msg = "Fingerprint is marged invalid";
*msg = "Fingerprint is marked invalid";
return FP_INVALID;
}
}
@@ -315,7 +315,7 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
if (rej == ADDR_POLICY_PROBABLY_REJECTED || rej == ADDR_POLICY_REJECTED) {
if (should_log)
info(LD_DIRSERV, "Rejecting '%s' because of address %s",
info(LD_DIRSERV, "Rejecting '%s' because of address '%s'",
nickname, address);
if (msg)
*msg = "Authdir is rejecting routers in this range.";
@@ -323,17 +323,16 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
}
if (inv == ADDR_POLICY_PROBABLY_REJECTED || inv == ADDR_POLICY_REJECTED) {
if (should_log)
info(LD_DIRSERV, "Not marking '%s' valid because of address %s",
info(LD_DIRSERV, "Not marking '%s' valid because of address '%s'",
nickname, address);
return FP_INVALID;
}
if (should_log)
debug(LD_DIRSERV,"No fingerprint found for '%s'",nickname);
if (!platform || tor_version_as_new_as(platform,"0.1.0.2-rc"))
return reject_unlisted ? FP_REJECT : FP_VALID;
else
return FP_INVALID;
if (should_log)
info(LD_DIRSERV,"No fingerprint found for '%s'",nickname);
return 0;
}
if (0==strcasecmp(nn_ent->fingerprint, fp)) {
if (should_log)
+1 -7
View File
@@ -3241,18 +3241,12 @@ router_list_client_downloadable(void)
} else if (digestmap_get(downloading, rs->status.descriptor_digest)) {
/* We're downloading this one now. */
++n_in_progress;
#if 0
/* Authorities don't call this path any longer. */
} else if (options->AuthoritativeDir &&
dirserv_would_reject_router(&rs->status)) {
++n_would_reject;
#endif
} else if (router_get_by_descriptor_digest(rs->status.descriptor_digest)) {
/* We have the 'best' descriptor for this router. */
++n_uptodate;
} else if ((ri = router_get_by_digest(rs->status.identity_digest)) &&
ri->cache_info.published_on > rs->status.published_on) {
/* Oddly, we have a descriptor more resent than the 'best' one, but it
/* Oddly, we have a descriptor more recent than the 'best' one, but it
was once best. So that's okay. */
++n_uptodate;
} else if (rs->status.published_on + ESTIMATED_PROPAGATION_TIME > now) {