bugfix: refactor to always use circuit_remove

this way we can always check if a new circ needs to be launched


svn:r254
This commit is contained in:
Roger Dingledine
2003-04-20 19:47:33 +00:00
parent f85ea447db
commit 11eee85576
2 changed files with 15 additions and 22 deletions
+5 -13
View File
@@ -272,19 +272,11 @@ void command_process_destroy_cell(cell_t *cell, connection_t *conn) {
onion_pending_remove(circ);
}
circuit_remove(circ);
if(cell->aci == circ->p_aci) { /* the destroy came from behind */
for(tmpconn = circ->n_conn; tmpconn; tmpconn=tmpconn->next_topic) {
connection_send_destroy(circ->n_aci, tmpconn);
}
}
if(cell->aci == circ->n_aci) { /* the destroy came from ahead */
for(tmpconn = circ->p_conn; tmpconn; tmpconn=tmpconn->next_topic) {
connection_send_destroy(circ->p_aci, tmpconn);
}
}
circuit_free(circ);
if(cell->aci == circ->p_aci) /* the destroy came from behind */
circ->p_conn = NULL;
if(cell->aci == circ->n_aci) /* the destroy came from ahead */
circ->n_conn = NULL;
circuit_close(circ);
}
/*