summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-19 18:31:02 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-19 18:31:02 +0000
commit07199e3d0978eea676fff8e17893e71becebdb41 (patch)
tree81700a4aa99c50cfc3e5faafa879a997fac3593b /src/or/dirserv.c
parent0a27b532521ec7d246e32a3a1d01723db326f638 (diff)
downloadtor-07199e3d0978eea676fff8e17893e71becebdb41.tar.gz
tor-07199e3d0978eea676fff8e17893e71becebdb41.zip
r12804@catbus: nickm | 2007-05-19 14:21:18 -0400
Disable a blatantly incorrect control event with potential for memory corruption. svn:r10219
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index bef5ef3f9b..8f3a922e5a 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -586,13 +586,19 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg)
ri->nickname);
*msg = "Not replacing router descriptor; no information has changed since "
"the last one with this identity.";
- routerinfo_free(ri);
control_event_or_authdir_new_descriptor("DROPPED", desc, *msg);
+ routerinfo_free(ri);
return 0;
}
if ((r = router_add_to_routerlist(ri, msg, 0, 0))<0) {
+#if 0
+ /* XXXX020 reinstate this code, but remember that it can't actually
+ work, since it is NOT kosher to look at ri or desc after
+ add_to_routerlist, _unless_ the descriptor is accepted.
+ */
if (r < -1) /* unless the routerinfo was fine, just out-of-date */
control_event_or_authdir_new_descriptor("REJECTED", desc, *msg);
+#endif
return r == -1 ? 0 : -1;
} else {
smartlist_t *changed;