[or-cvs] fix another crash bug that glenn fink reported.

Roger Dingledine arma at seul.org
Sun Mar 27 07:17:42 UTC 2005


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

Modified Files:
      Tag: tor-0_0_9-patches
	circuitbuild.c 
Log Message:
fix another crash bug that glenn fink reported.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.75.2.1
retrieving revision 1.75.2.2
diff -u -d -r1.75.2.1 -r1.75.2.2
--- circuitbuild.c	22 Dec 2004 08:38:47 -0000	1.75.2.1
+++ circuitbuild.c	27 Mar 2005 07:17:39 -0000	1.75.2.2
@@ -314,11 +314,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