[or-cvs] when reporting events about streams, use the "real" address...
Roger Dingledine
arma at seul.org
Tue Mar 22 10:34:26 UTC 2005
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
control.c
Log Message:
when reporting events about streams, use the "real" address for
the stream, including the requested .exit address.
Index: control.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- control.c 22 Mar 2005 05:41:05 -0000 1.61
+++ control.c 22 Mar 2005 10:34:23 -0000 1.62
@@ -939,15 +939,19 @@
{
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;
More information about the tor-commits
mailing list