r12492@catbus: nickm | 2007-04-22 20:24:02 -0400

Even more asserts to try to catch bug 404/417.


svn:r10003
This commit is contained in:
Nick Mathewson 2007-04-23 00:24:06 +00:00
parent c148dc7eb4
commit 5cf600b57a

View 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.