summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-04 06:43:03 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-04 06:43:03 +0000
commitf8a59965a11eee7197cd0b92cd522046e8991bcc (patch)
treea789dbb6279b81236249e707a25a3a8c03768ce9
parent485aa9415d0367dfbca34de116f0cff9fc16ffc1 (diff)
downloadtor-f8a59965a11eee7197cd0b92cd522046e8991bcc.tar.gz
tor-f8a59965a11eee7197cd0b92cd522046e8991bcc.zip
cleanups, and remove some unreachable code.
svn:r5727
-rw-r--r--src/or/dirserv.c11
-rw-r--r--src/or/routerlist.c8
2 files changed, 6 insertions, 13 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 34a3cf5ed7..3970cdd631 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -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)
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index eb8af3aa1b..16c69284bf 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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) {