diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-03-18 19:30:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-03-18 19:30:34 +0000 |
commit | c2f8d9721295ce30e2accaa01d225292ddafcec5 (patch) | |
tree | e7ba903ab187a28ef3fbaab41a722dc0284bd69f /src | |
parent | a335b43a6719e02f135415a1c9ef860d80a4bdac (diff) | |
download | tor-c2f8d9721295ce30e2accaa01d225292ddafcec5.tar.gz tor-c2f8d9721295ce30e2accaa01d225292ddafcec5.zip |
Do not generate the non-verbose circuit path when generating a circuit event unless we will use it.
svn:r19079
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/or/control.c b/src/or/control.c index 5600bdcfd9..5571fd30a6 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2989,14 +2989,10 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp, const char *status; char extended_buf[96]; int providing_reason=0; - char *path=NULL; if (!EVENT_IS_INTERESTING(EVENT_CIRCUIT_STATUS)) return 0; tor_assert(circ); - if (EVENT_IS_INTERESTING1S(EVENT_CIRCUIT_STATUS)) - path = circuit_list_path(circ,0); - switch (tp) { case CIRC_EVENT_LAUNCHED: status = "LAUNCHED"; break; @@ -3033,11 +3029,13 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp, } if (EVENT_IS_INTERESTING1S(EVENT_CIRCUIT_STATUS)) { + char *path = circuit_list_path(circ,0); const char *sp = strlen(path) ? " " : ""; send_control_event_extended(EVENT_CIRCUIT_STATUS, SHORT_NAMES, "650 CIRC %lu %s%s%s@%s\r\n", (unsigned long)circ->global_identifier, status, sp, path, extended_buf); + tor_free(path); } if (EVENT_IS_INTERESTING1L(EVENT_CIRCUIT_STATUS)) { char *vpath = circuit_list_path_for_controller(circ); @@ -3049,8 +3047,6 @@ control_event_circuit_status(origin_circuit_t *circ, circuit_status_event_t tp, tor_free(vpath); } - tor_free(path); - return 0; } |