diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-29 23:23:01 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-29 23:23:01 +0000 |
commit | 83c88c55fd928710d2aca525d19b2e3eb720c718 (patch) | |
tree | 3568d00ccce1994197ed84897e7396ce10c8ea4f /src/or/dirserv.c | |
parent | 10b360f188ac144d77db14ddde25fb9947e2b60a (diff) | |
download | tor-83c88c55fd928710d2aca525d19b2e3eb720c718.tar.gz tor-83c88c55fd928710d2aca525d19b2e3eb720c718.zip |
old or skewed descriptor doesn't mean we failed to parse it
svn:r1373
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 75dfae3b6f..0f906d47af 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -186,8 +186,8 @@ dirserv_free_descriptors() } /* Return 1 if descriptor is well-formed and accepted; - * 0 if well-formed and server is unapproved; - * -1 if not well-formed or if clock is skewed or other error. + * 0 if well-formed and server or descriptor is unapproved; + * -1 if not well-formed or other error. * * Update *desc to point after the descriptor if the * descriptor is well-formed. @@ -248,16 +248,16 @@ dirserv_add_descriptor(const char **desc) /* Is there too much clock skew? */ now = time(NULL); if (ri->published_on > now+ROUTER_ALLOW_SKEW) { - log_fn(LOG_WARN, "Publication time for nickname %s is too far in the future; possible clock skew. Not adding", ri->nickname); + log_fn(LOG_WARN, "Publication time for nickname %s is too far in the future; possible clock skew. Not adding.", ri->nickname); routerinfo_free(ri); *desc = end; - return -1; + return 0; } if (ri->published_on < now-ROUTER_MAX_AGE) { - log_fn(LOG_WARN, "Publication time for router with nickname %s is too far in the past. Not adding", ri->nickname); + log_fn(LOG_WARN, "Publication time for router with nickname %s is too far in the past. Not adding.", ri->nickname); routerinfo_free(ri); *desc = end; - return -1; + return 0; } /* Do we already have an entry for this router? */ |