aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control/control_events.c
diff options
context:
space:
mode:
authorJeremyRand <biolizard89@gmail.com>2019-09-20 12:18:37 +0000
committerJeremyRand <biolizard89@gmail.com>2019-10-27 01:32:21 +0000
commit2734968e40adc63b49652dd41d0bac20a1e28fa3 (patch)
tree9ef77aa7258d78bcd02771dfe0a050ec91698a61 /src/feature/control/control_events.c
parente7993dc046a099075bc5f9f65a7bb1601686d03c (diff)
downloadtor-2734968e40adc63b49652dd41d0bac20a1e28fa3.tar.gz
tor-2734968e40adc63b49652dd41d0bac20a1e28fa3.zip
Bug 19859: Add stream isolation data to STREAM event
Diffstat (limited to 'src/feature/control/control_events.c')
-rw-r--r--src/feature/control/control_events.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/feature/control/control_events.c b/src/feature/control/control_events.c
index 12b73641b2..427edbdf3f 100644
--- a/src/feature/control/control_events.c
+++ b/src/feature/control/control_events.c
@@ -833,13 +833,19 @@ control_event_stream_status(entry_connection_t *conn, stream_status_event_t tp,
circ = circuit_get_by_edge_conn(ENTRY_TO_EDGE_CONN(conn));
if (circ && CIRCUIT_IS_ORIGIN(circ))
origin_circ = TO_ORIGIN_CIRCUIT(circ);
- send_control_event(EVENT_STREAM_STATUS,
- "650 STREAM %"PRIu64" %s %lu %s%s%s%s\r\n",
+
+ {
+ char *conndesc = entry_connection_describe_status_for_controller(conn);
+ const char *sp = strlen(conndesc) ? " " : "";
+ send_control_event(EVENT_STREAM_STATUS,
+ "650 STREAM %"PRIu64" %s %lu %s%s%s%s%s%s\r\n",
(ENTRY_TO_CONN(conn)->global_identifier),
status,
origin_circ?
(unsigned long)origin_circ->global_identifier : 0ul,
- buf, reason_buf, addrport_buf, purpose);
+ buf, reason_buf, addrport_buf, purpose, sp, conndesc);
+ tor_free(conndesc);
+ }
/* XXX need to specify its intended exit, etc? */