diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-03-03 02:24:17 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-03-03 02:24:17 +0000 |
commit | 20ecb66c7d78012bd90a4fccc262724febfd6c0c (patch) | |
tree | f435c72b7ad6e87062034acf91c342d77921020b /src/or/circuit.c | |
parent | 5a053a6a8119e01e76985872b812558f8db30dce (diff) | |
download | tor-20ecb66c7d78012bd90a4fccc262724febfd6c0c.tar tor-20ecb66c7d78012bd90a4fccc262724febfd6c0c.tar.gz |
Fix (maybe) assert_circuit_ok. leave it disabled till arma confirms
svn:r1205
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r-- | src/or/circuit.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c index 11eb7a694..3809fdf71 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -58,8 +58,9 @@ void circuit_remove(circuit_t *circ) { 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 @@ void assert_circuit_ok(const circuit_t *c) 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 @@ void assert_circuit_ok(const circuit_t *c) 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); |