summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-06-13 09:20:23 +0000
committerRoger Dingledine <arma@torproject.org>2003-06-13 09:20:23 +0000
commit030564e95d85a0998e6341e26154767405e5482f (patch)
tree9b101cf6f76a2e10ba86948027d6bc7d9678e312 /src
parentd3292e484a9c19a2cfca885b5a45d593158d99b5 (diff)
downloadtor-030564e95d85a0998e6341e26154767405e5482f.tar.gz
tor-030564e95d85a0998e6341e26154767405e5482f.zip
send truncates AP-ward in a circuit, not destroys
svn:r313
Diffstat (limited to 'src')
-rw-r--r--src/or/command.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c
index f9b3ba3557..3ed153f7fe 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -204,11 +204,15 @@ void command_process_destroy_cell(cell_t *cell, connection_t *conn) {
onion_pending_remove(circ);
}
- if(cell->aci == circ->p_aci) /* the destroy came from behind */
+ if(cell->aci == circ->p_aci || circ->cpath) {
+ /* either the destroy came from behind, or we're the AP */
circ->p_conn = NULL;
- if(cell->aci == circ->n_aci) /* the destroy came from ahead */
+ circuit_close(circ);
+ } else { /* the destroy came from ahead */
circ->n_conn = NULL;
- circuit_close(circ);
+ log(LOG_DEBUG, "command_process_destroy_cell(): Delivering 'truncated' back.");
+ connection_edge_send_command(NULL, circ, RELAY_COMMAND_TRUNCATED);
+ }
}
/*