[or-cvs] bugfix: in some cases, connection_mark_for_close wasn"t mar...

Roger Dingledine arma at seul.org
Sat Feb 28 23:52:58 UTC 2004


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) {



More information about the tor-commits mailing list