[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] bugfix: in some cases, connection_mark_for_close wasn"t mar...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] bugfix: in some cases, connection_mark_for_close wasn"t mar...
- From: arma@seul.org (Roger Dingledine)
- Date: Sat, 28 Feb 2004 18:52:58 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 28 Feb 2004 18:53:14 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
connection.c
Log Message:
bugfix: in some cases, connection_mark_for_close wasn't marking the conn
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- connection.c 28 Feb 2004 22:23:44 -0000 1.165
+++ connection.c 28 Feb 2004 23:52:56 -0000 1.166
@@ -160,6 +160,7 @@
int
_connection_mark_for_close(connection_t *conn, char reason)
{
+ int retval = 0;
assert_connection_ok(conn,0);
if (conn->marked_for_close) {
@@ -185,7 +186,7 @@
connection_dns_remove(conn);
if (!conn->has_sent_end && reason &&
connection_edge_end(conn, reason, conn->cpath_layer) < 0)
- return -1;
+ retval = -1;
break;
case CONN_TYPE_DNSWORKER:
if (conn->state == DNSWORKER_STATE_BUSY) {
@@ -197,7 +198,7 @@
;
}
conn->marked_for_close = 1;
- return 0;
+ return retval;
}
int connection_create_listener(char *bindaddress, uint16_t bindport, int type) {