aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-09 15:47:50 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-09 15:47:50 +0000
commit26283e69ba88896d8aeb9141bdaeff15be916ec8 (patch)
tree377a1490710afcdd83ebd6e26559a74a1e0a6e9d /src/or/circuitlist.c
parentb76fd968b4d2deddf2f40f63dc04713f45649c68 (diff)
downloadtor-26283e69ba88896d8aeb9141bdaeff15be916ec8.tar.gz
tor-26283e69ba88896d8aeb9141bdaeff15be916ec8.zip
r8973@totoro: nickm | 2006-10-09 11:45:47 -0400
Touch up last patch (to add REASON to CIRC events): make some reasons more sensible, send reasons only to controllers that have enabled extended events, and clean up whitespace. svn:r8672
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 65e08a44ea..35514e3783 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -824,7 +824,7 @@ void
_circuit_mark_for_close(circuit_t *circ, int reason, int line,
const char *file)
{
- int orig_reason = reason;
+ int orig_reason = reason; /* Passed to the controller */
assert_circuit_ok(circ);
tor_assert(line);
tor_assert(file);
@@ -844,10 +844,8 @@ _circuit_mark_for_close(circuit_t *circ, int reason, int line,
}
reason = END_CIRC_REASON_NONE;
} else if (CIRCUIT_IS_ORIGIN(circ) && reason != END_CIRC_REASON_NONE) {
- /* Don't warn about this; there are plenty of places where our code
- * is origin-agnostic. */
- /* In fact, due to the desire to export reason information to the
- * controller, it has been made even more "origin-agnostic" than before */
+ /* We don't send reasons when closing circuits at the origin, but we want
+ * to track them anyway so we can give them to the controller. */
reason = END_CIRC_REASON_NONE;
}
if (reason < _END_CIRC_REASON_MIN || reason > _END_CIRC_REASON_MAX) {