diff options
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); } /* |