[or-cvs] don"t ever expire dirserver routerinfos!
Roger Dingledine
arma at seul.org
Thu May 20 06:42:40 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
routerlist.c
Log Message:
don't ever expire dirserver routerinfos!
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- routerlist.c 20 May 2004 05:10:30 -0000 1.80
+++ routerlist.c 20 May 2004 06:42:38 -0000 1.81
@@ -366,8 +366,9 @@
cutoff = time(NULL) - ROUTER_MAX_AGE;
for (i = 0; i < smartlist_len(routerlist->routers); ++i) {
router = smartlist_get(routerlist->routers, i);
- if (router->published_on < cutoff) {
- /* Too old. Remove it. */
+ if (router->published_on < cutoff &&
+ !router->dir_port) {
+ /* Too old. Remove it. But never remove dirservers! */
log_fn(LOG_INFO,"Forgetting obsolete routerinfo for node %s.", router->nickname);
routerinfo_free(router);
smartlist_del(routerlist->routers, i--);
More information about the tor-commits
mailing list