diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-26 04:32:01 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-26 04:32:01 +0000 |
commit | fb2279b90bf92b8395c315dc316a5999b4223759 (patch) | |
tree | 2bd0f5963590b07adb2c35a2caddf3e902af47aa /src/or/command.c | |
parent | bd38df847201e7574693be2993035a96decc164c (diff) | |
download | tor-fb2279b90bf92b8395c315dc316a5999b4223759.tar.gz tor-fb2279b90bf92b8395c315dc316a5999b4223759.zip |
since we don't support truncateds much, don't bother sending them;
just close the circ.
(this wasn't relevant before, because we were mis-handling destroys.)
svn:r1711
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/or/command.c b/src/or/command.c index 0a6ec559bb..8f0769c424 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -200,15 +200,20 @@ static void command_process_destroy_cell(cell_t *cell, connection_t *conn) { onion_pending_remove(circ); } - if(cell->circ_id == circ->p_circ_id || CIRCUIT_IS_ORIGIN(circ)) { - /* either the destroy came from behind, or we're the AP */ + if(cell->circ_id == circ->p_circ_id) { + /* the destroy came from behind */ circ->p_conn = NULL; circuit_mark_for_close(circ); } else { /* the destroy came from ahead */ circ->n_conn = NULL; - log_fn(LOG_DEBUG, "Delivering 'truncated' back."); - connection_edge_send_command(NULL, circ, RELAY_COMMAND_TRUNCATED, - NULL, 0, NULL); +#if 0 + if(!CIRCUIT_IS_ORIGIN(circ)) { + log_fn(LOG_DEBUG, "Delivering 'truncated' back."); + connection_edge_send_command(NULL, circ, RELAY_COMMAND_TRUNCATED, + NULL, 0, NULL); + } +#endif + circuit_mark_for_close(circ); } } |