[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10833: backport r10832 (in tor/branches/tor-0_1_2-patches: . src/or)



Author: arma
Date: 2007-07-15 20:14:38 -0400 (Sun, 15 Jul 2007)
New Revision: 10833

Modified:
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
backport r10832


Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-07-16 00:11:03 UTC (rev 10832)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-07-16 00:14:38 UTC (rev 10833)
@@ -29,8 +29,10 @@
       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

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-07-16 00:11:03 UTC (rev 10832)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-07-16 00:14:38 UTC (rev 10833)
@@ -2364,13 +2364,13 @@
       }
     }
 
-    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);