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

[or-cvs] r8741: Fix -Wlots with command.c (a uchar is never -1). Note also t (in tor/trunk: . src/or)



Author: nickm
Date: 2006-10-17 11:20:20 -0400 (Tue, 17 Oct 2006)
New Revision: 8741

Modified:
   tor/trunk/
   tor/trunk/src/or/command.c
Log:
 r9062@totoro:  nickm | 2006-10-17 11:19:43 -0400
 Fix -Wlots with command.c (a uchar is never -1).  Note also that one of our ifs is very stupid.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r9062] on 96637b51-b116-0410-a10e-9941ebb49b64

Modified: tor/trunk/src/or/command.c
===================================================================
--- tor/trunk/src/or/command.c	2006-10-17 15:20:15 UTC (rev 8740)
+++ tor/trunk/src/or/command.c	2006-10-17 15:20:20 UTC (rev 8741)
@@ -379,10 +379,12 @@
     circuit_set_n_circid_orconn(circ, 0, NULL);
     if (CIRCUIT_IS_ORIGIN(circ)) {
       /* Prevent arbitrary destroys from going unnoticed by controller */
-      if (reason == END_CIRC_AT_ORIGIN ||
-          reason == END_CIRC_REASON_NONE ||
+      if (reason == END_CIRC_REASON_NONE ||
           reason == END_CIRC_REASON_FINISHED ||
           reason == END_CIRC_REASON_REQUESTED) {
+        /* XXXX This logic is wrong.  Really, we should report the fact that
+         * the circuit was closed because of a DESTROY, *and* we should report
+         * the reason that we were given. -NM */
         reason = END_CIRC_REASON_DESTROYED;
       }
       circuit_mark_for_close(circ, reason);