[or-cvs] r17287: {tor} apply sebastian's bug 867 fix: make routerset_equal() work a (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Sun Nov 16 18:25:21 UTC 2008


Author: nickm
Date: 2008-11-16 13:25:20 -0500 (Sun, 16 Nov 2008)
New Revision: 17287

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/routerlist.c
Log:
apply sebastian's bug 867 fix: make routerset_equal() work as documented with NULL arguments

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-11-16 14:42:00 UTC (rev 17286)
+++ tor/trunk/ChangeLog	2008-11-16 18:25:20 UTC (rev 17287)
@@ -11,7 +11,9 @@
     - Made Tor a little less aggressive about deleting expired certificates.
       Partial fix for bug 854.
     - Stop doing unaligned memory access that generated bus errors on
-      sparc64.  Fix for bug 862.
+      sparc64.  Bugfix on 0.2.0.10-alpha.  Fix for bug 862.
+    - Fix a crash bug when changing ExcludeNodes from the controller.  Bugfix
+      on 0.2.1.6-alpha.  Fix for bug 867.  Patched by Sebastian.
 
   o Minor features (controller):
     - Return circuit purposes in response to GETINFO circuit-status.  Fixes

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2008-11-16 14:42:00 UTC (rev 17286)
+++ tor/trunk/src/or/routerlist.c	2008-11-16 18:25:20 UTC (rev 17287)
@@ -5100,6 +5100,11 @@
 int
 routerset_equal(const routerset_t *old, const routerset_t *new)
 {
+  if (old == NULL && new == NULL)
+    return 1;
+  else if (old == NULL || new == NULL)
+    return 0;
+
   if (smartlist_len(old->list) != smartlist_len(new->list))
     return 0;
 



More information about the tor-commits mailing list