diff --git a/ChangeLog b/ChangeLog index 5982f2a20..c77e2ea96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,8 +29,10 @@ Changes in version 0.1.2.15 - 2007-07-?? guard list unless we need to. o Minor bugfixes (directory): - - Count the number of authorities that recommend each version - correctly. Previously, we were under-counting by 1. + - Correctly count the number of authorities that recommend each + version. Previously, we were under-counting by 1. + - Fix a potential crash bug when we load many server descriptors at + once and some of them make others of them obsolete. Fixes bug 458. o Minor bugfixes (hidden services): - Stop tearing down the whole circuit when the user asks for a diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 940371ef8..a94324d3f 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2364,13 +2364,13 @@ router_load_routers_from_string(const char *s, size_t len, } } - if (router_add_to_routerlist(ri, &msg, from_cache, !from_cache) >= 0) + if (router_add_to_routerlist(ri, &msg, from_cache, !from_cache) >= 0) { smartlist_add(changed, ri); + control_event_descriptors_changed(changed); + smartlist_clear(changed); + } }); - if (smartlist_len(changed)) - control_event_descriptors_changed(changed); - routerlist_assert_ok(routerlist); router_rebuild_store(0);