[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] don"t double-detach a closing exit conn that"s waiting for ...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] don"t double-detach a closing exit conn that"s waiting for ...
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Sun, 30 Jan 2005 20:27:51 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 30 Jan 2005 20:28:11 -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:
	connection.c 
Log Message:
don't double-detach a closing exit conn that's waiting for dns resolve
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -d -r1.319 -r1.320
--- connection.c	31 Jan 2005 01:02:20 -0000	1.319
+++ connection.c	31 Jan 2005 01:27:49 -0000	1.320
@@ -215,6 +215,7 @@
  */
 void connection_about_to_close_connection(connection_t *conn)
 {
+  circuit_t *circ;
 
   assert(conn->marked_for_close);
 
@@ -271,7 +272,9 @@
       break;
     case CONN_TYPE_EXIT:
       if (conn->state == EXIT_CONN_STATE_RESOLVING) {
-        circuit_detach_stream(circuit_get_by_conn(conn), conn);
+        circ = circuit_get_by_conn(conn);
+        if (circ)
+          circuit_detach_stream(circ, conn);
         connection_dns_remove(conn);
       }
       break;