Browse Source

r11787@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.)


svn:r9575

Nick Mathewson 18 years ago
parent
commit
d9c095be3e
2 changed files with 6 additions and 0 deletions
  1. 2 0
      ChangeLog
  2. 4 0
      src/or/routerlist.c

+ 2 - 0
ChangeLog

@@ -58,6 +58,8 @@ Changes in version 0.1.2.8-alpha - 2007-??-??
     - 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

+ 4 - 0
src/or/routerlist.c

@@ -4154,10 +4154,14 @@ update_router_have_minimum_dir_info(void)
 {
   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) {