diff options
author | Roger Dingledine <arma@torproject.org> | 2003-04-20 19:47:33 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-04-20 19:47:33 +0000 |
commit | f54186aa916326ad097c32fa02c4e85d6697fc39 (patch) | |
tree | dbc0f28208fd9a0ee8b9b0081d8f539b60f12126 /src/or/command.c | |
parent | ffae44aafd4ea988d8ae7d72fdad350e953c165a (diff) | |
download | tor-f54186aa916326ad097c32fa02c4e85d6697fc39.tar.gz tor-f54186aa916326ad097c32fa02c4e85d6697fc39.zip |
bugfix: refactor to always use circuit_remove
this way we can always check if a new circ needs to be launched
svn:r254
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/or/command.c b/src/or/command.c index 230a117c63..00a079e00d 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -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); } /* |