[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] cleanups, and remove some unreachable code.
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
dirserv.c routerlist.c
Log Message:
cleanups, and remove some unreachable code.
Index: dirserv.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -p -d -r1.285 -r1.286
--- dirserv.c 4 Jan 2006 04:42:10 -0000 1.285
+++ dirserv.c 4 Jan 2006 06:43:03 -0000 1.286
@@ -302,7 +302,7 @@ dirserv_get_status_impl(const char *fp,
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,
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,
}
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)
Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -p -d -r1.415 -r1.416
--- routerlist.c 4 Jan 2006 04:42:10 -0000 1.415
+++ routerlist.c 4 Jan 2006 06:43:03 -0000 1.416
@@ -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) {