aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-17 15:20:20 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-17 15:20:20 +0000
commitefbe87cb6ca59c7ed52f03f8db6d934dc95ef3a9 (patch)
treec532c342f55d49173cab71aed5f2dbbefcc4a2e9
parentfaf7445255684f21e5c1043602afac6d047e5bf3 (diff)
downloadtor-efbe87cb6ca59c7ed52f03f8db6d934dc95ef3a9.tar.gz
tor-efbe87cb6ca59c7ed52f03f8db6d934dc95ef3a9.zip
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. svn:r8741
-rw-r--r--src/or/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/command.c b/src/or/command.c
index ff10d35892..9b30e2379d 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -379,10 +379,12 @@ command_process_destroy_cell(cell_t *cell, or_connection_t *conn)
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);