[or-cvs] don"t crash, if a conn that sent a begin has suddenly lost ...

Roger Dingledine arma at seul.org
Sun Apr 25 22:48:49 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection_edge.c 
Log Message:
don't crash, if a conn that sent a begin has suddenly lost its circuit


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- connection_edge.c	25 Apr 2004 20:37:37 -0000	1.177
+++ connection_edge.c	25 Apr 2004 22:48:47 -0000	1.178
@@ -620,6 +620,11 @@
       continue;
     conn->num_retries++;
     circ = circuit_get_by_conn(conn);
+    if(!circ) { /* it's vanished? */
+      log_fn(LOG_INFO,"Conn is in connect-wait, but lost its circ.");
+      connection_mark_for_close(conn,0);
+      continue;
+    }
     if(circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
       if (now - conn->timestamp_lastread > 45) {
         log_fn(LOG_WARN,"Rend stream is %d seconds late. Giving up.",



More information about the tor-commits mailing list