[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] bugfix: when we"re reporting event circuit status, don"t ca...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] bugfix: when we"re reporting event circuit status, don"t ca...
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Mon, 13 Dec 2004 22:36:35 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 13 Dec 2004 22:37:05 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
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:
bugfix: when we're reporting event circuit status, don't call it a stream.
while we're at it, include ":port" in the stream event string.
Index: control.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- control.c 13 Dec 2004 18:48:12 -0000 1.37
+++ control.c 14 Dec 2004 03:36:33 -0000 1.38
@@ -516,7 +516,7 @@
set_uint32(msg+1, htonl(circ->global_identifier));
strlcpy(msg+5,path,path_len+1);
- send_control_event(EVENT_STREAM_STATUS, (uint16_t)(path_len+6), msg);
+ send_control_event(EVENT_CIRCUIT_STATUS, (uint16_t)(path_len+6), msg);
tor_free(path);
tor_free(msg);
return 0;
@@ -529,17 +529,20 @@
{
char *msg;
size_t len;
+ char buf[256];
tor_assert(conn->type == CONN_TYPE_AP);
tor_assert(conn->socks_request);
if (!EVENT_IS_INTERESTING(EVENT_STREAM_STATUS))
return 0;
- len = strlen(conn->socks_request->address);
+ tor_snprintf(buf, sizeof(buf), "%s:%d",
+ conn->socks_request->address, conn->socks_request->port),
+ len = strlen(buf);
msg = tor_malloc(5+len+1);
msg[0] = (uint8_t) tp;
set_uint32(msg+1, htonl(conn->s)); /* ???? Is this a security problem? */
- strlcpy(msg+5, conn->socks_request->address, len+1);
+ strlcpy(msg+5, buf, len+1);
send_control_event(EVENT_STREAM_STATUS, (uint16_t)(5+len+1), msg);
tor_free(msg);