[or-cvs] r9654: fix a bug in our logic, but point out that maybe it's moot (tor/trunk/src/or)

arma at seul.org arma at seul.org
Mon Feb 26 05:33:20 UTC 2007


Author: arma
Date: 2007-02-26 00:33:17 -0500 (Mon, 26 Feb 2007)
New Revision: 9654

Modified:
   tor/trunk/src/or/routerlist.c
Log:
fix a bug in our logic, but point out that maybe it's moot


Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-02-26 01:40:48 UTC (rev 9653)
+++ tor/trunk/src/or/routerlist.c	2007-02-26 05:33:17 UTC (rev 9654)
@@ -1598,6 +1598,9 @@
   // routerlist_assert_ok(rl);
 }
 
+/** If we're a directory cache and routerlist <b>rl</b> doesn't have
+ * a copy of router <b>ri</b> yet, add it to the list of old (not
+ * recommended but still served) descriptors. Else free it. */
 static void
 routerlist_insert_old(routerlist_t *rl, routerinfo_t *ri)
 {
@@ -4031,8 +4034,14 @@
       smartlist_t *dl;
       dl = downloadable[ns_sl_idx] = smartlist_create();
       download_from[ns_sl_idx] = smartlist_create();
-      if (ns->published_on + MAX_NETWORKSTATUS_AGE-10*60 > now) {
+      if (ns->published_on + MAX_NETWORKSTATUS_AGE+10*60 < now) {
         /* Don't download if the networkstatus is almost ancient. */
+        /* Actually, I suspect what's happening here is that we ask
+         * for the descriptor when we have a given networkstatus,
+         * and then we get a newer networkstatus, and then we receive
+         * the descriptor. Having a networkstatus actually expire is
+         * probably a rare event, and we'll probably be happiest if
+         * we take this clause out. -RD */
         continue;
       }
       SMARTLIST_FOREACH(ns->entries, routerstatus_t * , rs,



More information about the tor-commits mailing list