diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-03 14:35:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-03 14:35:03 -0400 |
commit | 40487b0141096ddb40bec38f7d1c6a4367d8c279 (patch) | |
tree | 7f38806dd0624f5f4cfbef673cc6f911f3769ce2 /src/or/relay.c | |
parent | df2615d43da4578b7fb68eb753cc1c0d943642af (diff) | |
parent | 70b9e79700f85ac07b931a2c836b4d63d0ba70c1 (diff) | |
download | tor-40487b0141096ddb40bec38f7d1c6a4367d8c279.tar.gz tor-40487b0141096ddb40bec38f7d1c6a4367d8c279.zip |
Merge remote-tracking branch 'dgoulet/bug20376_030_01'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 823e0743bd..f5e9a6bb8c 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -610,14 +610,13 @@ relay_send_command_from_edge_(streamid_t stream_id, circuit_t *circ, memset(&cell, 0, sizeof(cell_t)); cell.command = CELL_RELAY; - if (cpath_layer) { + if (CIRCUIT_IS_ORIGIN(circ)) { + tor_assert(cpath_layer); cell.circ_id = circ->n_circ_id; cell_direction = CELL_DIRECTION_OUT; - } else if (! CIRCUIT_IS_ORIGIN(circ)) { + } else { cell.circ_id = TO_OR_CIRCUIT(circ)->p_circ_id; cell_direction = CELL_DIRECTION_IN; - } else { - return -1; } memset(&rh, 0, sizeof(rh)); |