[or-cvs] forward-port the fixing of the crash bug.

Roger Dingledine arma at seul.org
Sun Mar 27 07:18:33 UTC 2005


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

Modified Files:
	circuitbuild.c 
Log Message:
forward-port the fixing of the crash bug.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- circuitbuild.c	27 Mar 2005 04:55:12 -0000	1.96
+++ circuitbuild.c	27 Mar 2005 07:18:30 -0000	1.97
@@ -350,11 +350,11 @@
   for (circ=global_circuitlist;circ;circ = circ->next) {
     if (circ->marked_for_close)
       continue;
-    if (!circ->n_conn &&
+    if (circ->state == CIRCUIT_STATE_OR_WAIT &&
+        !circ->n_conn &&
         circ->n_addr == or_conn->addr &&
         circ->n_port == or_conn->port &&
         !memcmp(or_conn->identity_digest, circ->n_conn_id_digest, DIGEST_LEN)) {
-      tor_assert(circ->state == CIRCUIT_STATE_OR_WAIT);
       if (!status) { /* or_conn failed; close circ */
         log_fn(LOG_INFO,"or_conn failed. Closing circ.");
         circuit_mark_for_close(circ);



More information about the tor-commits mailing list