From 43fcb70badace73a87553b8940dbd91829a0bd1e Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 23 Dec 2003 07:45:31 +0000 Subject: checkpoint: revamp relay cell packaging and handling include the infrastructure for inserting padding cells when there's a relay-recognized conflict, but it does not work currently. svn:r958 --- src/or/command.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/or/command.c') diff --git a/src/or/command.c b/src/or/command.c index 3d65b2b9a..0a3b91843 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -168,16 +168,14 @@ static void command_process_relay_cell(cell_t *cell, connection_t *conn) { } if(cell->circ_id == circ->p_circ_id) { /* it's an outgoing cell */ - cell->circ_id = circ->n_circ_id; /* switch it */ - if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_OUT, conn->cpath_layer) < 0) { - log_fn(LOG_WARN,"circuit_deliver_relay_cell (forward) failed. Closing."); + if(circuit_receive_relay_cell(cell, circ, CELL_DIRECTION_OUT) < 0) { + log_fn(LOG_WARN,"circuit_receive_relay_cell (forward) failed. Closing."); circuit_close(circ); return; } } else { /* it's an ingoing cell */ - cell->circ_id = circ->p_circ_id; /* switch it */ - if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_IN, NULL) < 0) { - log_fn(LOG_WARN,"circuit_deliver_relay_cell (backward) failed. Closing."); + if(circuit_receive_relay_cell(cell, circ, CELL_DIRECTION_IN) < 0) { + log_fn(LOG_WARN,"circuit_receive_relay_cell (backward) failed. Closing."); circuit_close(circ); return; } -- cgit v1.2.3