summaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-04-20 19:47:33 +0000
committerRoger Dingledine <arma@torproject.org>2003-04-20 19:47:33 +0000
commitf54186aa916326ad097c32fa02c4e85d6697fc39 (patch)
treedbc0f28208fd9a0ee8b9b0081d8f539b60f12126 /src/or/command.c
parentffae44aafd4ea988d8ae7d72fdad350e953c165a (diff)
downloadtor-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.c18
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);
}
/*