aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-19 23:04:49 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-19 23:04:49 +0000
commitbfdb93d8bd7fbc24def7fa1a38c5b9a144eb5a44 (patch)
tree222f9fdd7fe6385d80bb38525fe4bd98e494a576 /src/or/circuitlist.c
parent26951e870997f7f52493ea1652dc427f95eb7872 (diff)
downloadtor-bfdb93d8bd7fbc24def7fa1a38c5b9a144eb5a44.tar
tor-bfdb93d8bd7fbc24def7fa1a38c5b9a144eb5a44.tar.gz
r9272@Kushana: nickm | 2006-10-19 12:52:37 -0400
Fix an XXX in handling destroy cells: when we get a destroy cell with reason FOO, do not tell the controller REASON=FOO. Instead, say REASON=DESTROYED REMOTE_REASON=FOO. Suggested by a conversation with Mike Perry. svn:r8760
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 37b3717ff..8f7cb3e19 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -848,6 +848,10 @@ _circuit_mark_for_close(circuit_t *circ, int reason, int line,
* to track them anyway so we can give them to the controller. */
reason = END_CIRC_REASON_NONE;
}
+
+ if (reason & END_CIRC_REASON_FLAG_REMOTE)
+ reason &= ~END_CIRC_REASON_FLAG_REMOTE;
+
if (reason < _END_CIRC_REASON_MIN || reason > _END_CIRC_REASON_MAX) {
log_warn(LD_BUG, "Reason %d out of range at %s:%d", reason, file, line);
orig_reason = reason = END_CIRC_REASON_NONE;