summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-01-08 21:33:15 +0000
committerNick Mathewson <nickm@torproject.org>2006-01-08 21:33:15 +0000
commit5d709e851774276ea10a09c6a816d1766290fac7 (patch)
tree6c93e44595a1e38ecc87c23bfb8ba32e76ab783c
parente30516f33f53d34c39d3613cecca0f4567b8e11e (diff)
downloadtor-5d709e851774276ea10a09c6a816d1766290fac7.tar.gz
tor-5d709e851774276ea10a09c6a816d1766290fac7.zip
Fix bug in last commit. Also, fix bug 231: authorities should never treat their own descriptor changes as cosmetic.
svn:r5755
-rw-r--r--src/or/dirserv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index f3ca5fda9e..e7a52dda6b 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -524,7 +524,8 @@ dirserv_add_descriptor(const char *desc, const char **msg)
* 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(const char *networkstatus,
if (networkstatus) {
if (published > d->published) {
set_cached_dir(d, tor_strdup(networkstatus), published);
- } else {
- networkstatus_free(networkstatus);
}
} else {
free_cached_dir(d);