diff options
author | Roger Dingledine <arma@torproject.org> | 2002-12-23 06:48:14 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2002-12-23 06:48:14 +0000 |
commit | fbf4ca3ff810d148f7cc937ea7558666b5ede5a9 (patch) | |
tree | 5fb656f5965aebe6d7c20dba9f34fe5ae959c23f /src/or/command.c | |
parent | 7a18057357069a38918a65039b4a2ab63dbef4ec (diff) | |
download | tor-fbf4ca3ff810d148f7cc937ea7558666b5ede5a9.tar.gz tor-fbf4ca3ff810d148f7cc937ea7558666b5ede5a9.zip |
bugfix: couldn't send two creates, two datas, and the destroy all at once
(amazing the odd behavior you get to test when you have a flaky modem
connection)
svn:r148
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c index c725b22808..ab042c0609 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -300,10 +300,14 @@ 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 */ - connection_send_destroy(circ->n_aci, circ->n_conn); - if(cell->aci == circ->n_aci) /* the destroy came from ahead */ + if(cell->aci == circ->p_aci) { /* the destroy came from behind */ + if(circ->n_conn) /* might not be defined, eg if it was just on the pending queue */ + connection_send_destroy(circ->n_aci, circ->n_conn); + } + if(cell->aci == circ->n_aci) { /* the destroy came from ahead */ + assert(circ->p_conn); connection_send_destroy(circ->p_aci, circ->p_conn); + } circuit_free(circ); } |