[or-cvs] Fix bug in last commit. Also, fix bug 231: authorities shou...

Nick Mathewson nickm at seul.org
Sun Jan 8 21:33:17 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25715/src/or

Modified Files:
	dirserv.c 
Log Message:
Fix bug in last commit. Also, fix bug 231: authorities should never treat their own descriptor changes as cosmetic.

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.287
retrieving revision 1.288
diff -u -p -d -r1.287 -r1.288
--- dirserv.c	8 Jan 2006 21:26:33 -0000	1.287
+++ dirserv.c	8 Jan 2006 21:33:15 -0000	1.288
@@ -524,7 +524,8 @@ dirserv_add_descriptor(const char *desc,
    * another authority has, so we all converge on the same one.) */
   ri_old = router_get_by_digest(ri->cache_info.identity_digest);
   if (ri_old && ri_old->cache_info.published_on < ri->cache_info.published_on
-      && router_differences_are_cosmetic(ri_old, ri)) {
+      && router_differences_are_cosmetic(ri_old, ri)
+      && !router_is_me(ri)) {
     info(LD_DIRSERV,
          "Not replacing descriptor from '%s'; differences are cosmetic.",
          ri->nickname);
@@ -1007,8 +1008,6 @@ dirserv_set_cached_networkstatus_v2(cons
   if (networkstatus) {
     if (published > d->published) {
       set_cached_dir(d, tor_strdup(networkstatus), published);
-    } else {
-      networkstatus_free(networkstatus);
     }
   } else {
     free_cached_dir(d);



More information about the tor-commits mailing list