From 26283e69ba88896d8aeb9141bdaeff15be916ec8 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 9 Oct 2006 15:47:50 +0000 Subject: 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 --- src/or/circuitlist.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/or/circuitlist.c') 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) { -- cgit v1.2.3-54-g00ecf