aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/relay.c
diff options
context:
space:
mode:
authorNeel <neel@neelc.org>2019-08-08 13:05:46 -0400
committerNeel <neel@neelc.org>2019-08-08 13:05:46 -0400
commit64d2133a6164e201edb075154124e210cbbffe51 (patch)
tree929599833824d8aaeb989566038d10318e7e6f3b /src/core/or/relay.c
parentb47adcbcabf8b07ffb19b0cfeb02996b07104ccf (diff)
downloadtor-64d2133a6164e201edb075154124e210cbbffe51.tar.gz
tor-64d2133a6164e201edb075154124e210cbbffe51.zip
Move the connection_edge_process_relay_cell() assignments out of if statements in circuit_receive_relay_cell()
Diffstat (limited to 'src/core/or/relay.c')
-rw-r--r--src/core/or/relay.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index d66caf3ad0..a437b54792 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -265,8 +265,8 @@ circuit_receive_relay_cell(cell_t *cell, circuit_t *circ,
if (cell_direction == CELL_DIRECTION_OUT) {
++stats_n_relay_cells_delivered;
log_debug(LD_OR,"Sending away from origin.");
- if ((reason = connection_edge_process_relay_cell(cell, circ, conn, NULL))
- < 0) {
+ reason = connection_edge_process_relay_cell(cell, circ, conn, NULL);
+ if (reason < 0) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"connection_edge_process_relay_cell (away from origin) "
"failed.");
@@ -276,8 +276,9 @@ circuit_receive_relay_cell(cell_t *cell, circuit_t *circ,
if (cell_direction == CELL_DIRECTION_IN) {
++stats_n_relay_cells_delivered;
log_debug(LD_OR,"Sending to origin.");
- if ((reason = connection_edge_process_relay_cell(cell, circ, conn,
- layer_hint)) < 0) {
+ reason = connection_edge_process_relay_cell(cell, circ, conn,
+ layer_hint);
+ if (reason < 0) {
/* If a client is trying to connect to unknown hidden service port,
* END_CIRC_AT_ORIGIN is sent back so we can then close the circuit.
* Do not log warn as this is an expected behavior for a service. */