[or-cvs] send truncates AP-ward in a circuit, not destroys
Roger Dingledine
arma at seul.org
Fri Jun 13 09:20:26 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or
Modified Files:
command.c
Log Message:
send truncates AP-ward in a circuit, not destroys
Index: command.c
===================================================================
RCS file: /home/or/cvsroot/src/or/command.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- command.c 12 Jun 2003 10:16:33 -0000 1.32
+++ command.c 13 Jun 2003 09:20:23 -0000 1.33
@@ -204,11 +204,15 @@
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);
+ }
}
/*
More information about the tor-commits
mailing list