]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r12492@catbus: nickm | 2007-04-22 20:24:02 -0400
authorNick Mathewson <nickm@torproject.org>
Mon, 23 Apr 2007 00:24:06 +0000 (00:24 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 23 Apr 2007 00:24:06 +0000 (00:24 +0000)
 Even more asserts to try to catch bug 404/417.

svn:r10003

src/or/routerlist.c

index 0f98b3d3a43710d66f64f3fde16a2c44b27e96ae..b1efe89eaf8a2959dec19dd5a416c61e5ccd2bcf 100644 (file)
@@ -1757,6 +1757,7 @@ routerlist_remove(routerlist_t *rl, routerinfo_t *ri, int idx, int make_old)
   // routerlist_assert_ok(rl);
 }
 
+/** DOCDOC */
 static void
 routerlist_remove_old(routerlist_t *rl, signed_descriptor_t *sd, int idx)
 {
@@ -2280,6 +2281,8 @@ routerlist_remove_old_routers(void)
   if (!routerlist || !networkstatus_list)
     return;
 
+  routerlist_assert_ok(routerlist);
+
   retain = digestmap_new();
   cutoff = now - OLD_ROUTER_DESC_MAX_AGE;
   /* Build a list of all the descriptors that _anybody_ recommends. */
@@ -2319,6 +2322,8 @@ routerlist_remove_old_routers(void)
     }
   }
 
+  routerlist_assert_ok(routerlist);
+
   /* Remove far-too-old members of routerlist->old_routers. */
   cutoff = now - OLD_ROUTER_DESC_MAX_AGE;
   for (i = 0; i < smartlist_len(routerlist->old_routers); ++i) {
@@ -2330,6 +2335,8 @@ routerlist_remove_old_routers(void)
     }
   }
 
+  routerlist_assert_ok(routerlist);
+
   /* Now we might have to look at routerlist->old_routers for extraneous
    * members. (We'd keep all the members if we could, but we need to save
    * space.) First, check whether we have too many router descriptors, total.