diff options
author | Roger Dingledine <arma@torproject.org> | 2005-03-22 10:34:23 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-03-22 10:34:23 +0000 |
commit | d6a0e5bcc9311f073fff93275e3897017698fdb1 (patch) | |
tree | 2f1787af9635fa5ff2a51c0d5f147f9ca41478ea /src | |
parent | e07e0a4732d17f9225ade848f244ae7ea70f7208 (diff) | |
download | tor-d6a0e5bcc9311f073fff93275e3897017698fdb1.tar tor-d6a0e5bcc9311f073fff93275e3897017698fdb1.tar.gz |
when reporting events about streams, use the "real" address for
the stream, including the requested .exit address.
svn:r3810
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c index 45c84d1b9..a655521ec 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -939,15 +939,19 @@ control_event_stream_status(connection_t *conn, stream_status_event_t tp) { char *msg; size_t len; - char buf[256]; + char buf[256], buf2[256]; tor_assert(conn->type == CONN_TYPE_AP); tor_assert(conn->socks_request); if (!EVENT_IS_INTERESTING(EVENT_STREAM_STATUS)) return 0; - tor_snprintf(buf, sizeof(buf), "%s:%d", - conn->socks_request->address, conn->socks_request->port), + if (conn->chosen_exit_name) + tor_snprintf(buf2, sizeof(buf2), ".%s.exit", conn->chosen_exit_name); + tor_snprintf(buf, sizeof(buf), "%s%s:%d", + conn->socks_request->address, + conn->chosen_exit_name ? buf2 : "", + conn->socks_request->port), len = strlen(buf); msg = tor_malloc(5+len+1); msg[0] = (uint8_t) tp; |