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

[or-cvs] r10219: Disable a blatantly incorrect control event with potential f (in tor/trunk: . src/or)



Author: nickm
Date: 2007-05-19 14:31:02 -0400 (Sat, 19 May 2007)
New Revision: 10219

Modified:
   tor/trunk/
   tor/trunk/src/or/dirserv.c
Log:
 r12804@catbus:  nickm | 2007-05-19 14:21:18 -0400
 Disable a blatantly incorrect control event with potential for memory corruption.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12804] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2007-05-19 18:12:31 UTC (rev 10218)
+++ tor/trunk/src/or/dirserv.c	2007-05-19 18:31:02 UTC (rev 10219)
@@ -586,13 +586,19 @@
              ri->nickname);
     *msg = "Not replacing router descriptor; no information has changed since "
       "the last one with this identity.";
+    control_event_or_authdir_new_descriptor("DROPPED", desc, *msg);
     routerinfo_free(ri);
-    control_event_or_authdir_new_descriptor("DROPPED", desc, *msg);
     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;