From 0e34c68fd42c1fab57b636fea08eb94748c2514b Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Mon, 16 Jul 2007 00:14:38 +0000 Subject: backport r10832 svn:r10833 --- ChangeLog | 6 ++++-- src/or/routerlist.c | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5982f2a207..c77e2ea96f 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 940371ef80..a94324d3f2 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); -- cgit v1.2.3-54-g00ecf