[or-cvs] r9575: Always remove expired routers and networkstatus docs before (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Feb 13 02:01:40 UTC 2007


Author: nickm
Date: 2007-02-12 21:01:38 -0500 (Mon, 12 Feb 2007)
New Revision: 9575

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/routerlist.c
Log:
 r11787 at catbus:  nickm | 2007-02-12 21:01:34 -0500
 Always remove expired routers and networkstatus docs before checking whether we have enough information to build circuits. (Fixes bug 373.)



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11787] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-02-13 01:27:55 UTC (rev 9574)
+++ tor/trunk/ChangeLog	2007-02-13 02:01:38 UTC (rev 9575)
@@ -58,6 +58,8 @@
     - Do not warn when individual nodes in the configuration's EntryNodes,
       ExitNodes (etc) are down: warn only when all possible nodes are down.
       (Fixes bug 348.)
+    - Always remove expired routers and networkstatus docs before checking
+      whether we have enough information to build circuits. (Fixes bug 373)
 
 
 Changes in version 0.1.2.7-alpha - 2007-02-06

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-02-13 01:27:55 UTC (rev 9574)
+++ tor/trunk/src/or/routerlist.c	2007-02-13 02:01:38 UTC (rev 9575)
@@ -4154,10 +4154,14 @@
 {
   int tot = 0, num_running = 0;
   int n_ns, n_authorities, res, avg;
+  time_t now = time(NULL);
   if (!networkstatus_list || !routerlist) {
     res = 0;
     goto done;
   }
+  routerlist_remove_old_routers();
+  networkstatus_list_clean(now);
+
   n_authorities = get_n_v2_authorities();
   n_ns = smartlist_len(networkstatus_list);
   if (n_ns<=n_authorities/2) {



More information about the tor-commits mailing list