[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Fix (maybe) assert_circuit_ok. leave it disabled till arma ...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv9106/src/or

Modified Files:
	circuit.c 
Log Message:
Fix (maybe) assert_circuit_ok. leave it disabled till arma confirms

Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- circuit.c	3 Mar 2004 01:37:54 -0000	1.147
+++ circuit.c	3 Mar 2004 02:24:17 -0000	1.148
@@ -58,8 +58,9 @@
 void circuit_close_all_marked()
 {
   circuit_t *tmp,*m;
-
+  
   while (global_circuitlist && global_circuitlist->marked_for_close) {
+    
     tmp = global_circuitlist->next;
     circuit_free(global_circuitlist);
     global_circuitlist = tmp;
@@ -1267,17 +1268,15 @@
 
   assert(c);
   assert(c->magic == CIRCUIT_MAGIC);
-
+  
   return;
 
-  assert(c->n_addr);
-  assert(c->n_port);
-  assert(c->n_conn);
-  assert(c->n_conn->type == CONN_TYPE_OR);
+  if (c->n_conn)
+    assert(c->n_conn->type == CONN_TYPE_OR);
   if (c->p_conn)
     assert(c->p_conn->type == CONN_TYPE_OR);
   for (conn = c->p_streams; conn; conn = conn->next_stream)
-    assert(c->p_conn->type == CONN_TYPE_EXIT);
+    assert(c->p_conn->type == CONN_TYPE_AP);
   for (conn = c->n_streams; conn; conn = conn->next_stream)
     assert(conn->type == CONN_TYPE_EXIT);
 
@@ -1287,7 +1286,7 @@
     if (c->cpath) {
       assert(!c->n_crypto);
       assert(!c->p_crypto);
-      assert(!c->n_digest);
+      assert(!c->n_digest); 
       assert(!c->p_digest);
     } else {
       assert(c->n_crypto);