aboutsummaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-12-23 07:45:31 +0000
committerRoger Dingledine <arma@torproject.org>2003-12-23 07:45:31 +0000
commit43fcb70badace73a87553b8940dbd91829a0bd1e (patch)
tree369119c85b364ac6c439c48f3dc08ef042273b1f /src/or/command.c
parentbc8c6732cb17fbd3d1105d79fbbf02b691bc3576 (diff)
downloadtor-43fcb70badace73a87553b8940dbd91829a0bd1e.tar
tor-43fcb70badace73a87553b8940dbd91829a0bd1e.tar.gz
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
Diffstat (limited to 'src/or/command.c')
-rw-r--r--src/or/command.c10
1 files changed, 4 insertions, 6 deletions
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;
}