diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2014-11-23 21:27:15 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-21 14:48:38 -0500 |
commit | 551221bad6a852750a9f0bd0e4e521192dbc7999 (patch) | |
tree | 14de476859f062d842305d5f474aa355f4a91b99 /src | |
parent | 74731607651998bc6bdce9559c3352d57c60008c (diff) | |
download | tor-551221bad6a852750a9f0bd0e4e521192dbc7999.tar.gz tor-551221bad6a852750a9f0bd0e4e521192dbc7999.zip |
Using channel state lookup macros in circuitlist.c.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitlist.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index c7287f921d..fad79c116d 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1752,9 +1752,7 @@ circuit_mark_for_close_, (circuit_t *circ, int reason, int line, if (circ->n_chan) { circuit_clear_cell_queue(circ, circ->n_chan); /* Only send destroy if the channel isn't closing anyway */ - if (!(circ->n_chan->state == CHANNEL_STATE_CLOSING || - circ->n_chan->state == CHANNEL_STATE_CLOSED || - circ->n_chan->state == CHANNEL_STATE_ERROR)) { + if (!CHANNEL_CONDEMNED(circ->n_chan)) { channel_send_destroy(circ->n_circ_id, circ->n_chan, reason); } circuitmux_detach_circuit(circ->n_chan->cmux, circ); @@ -1786,9 +1784,7 @@ circuit_mark_for_close_, (circuit_t *circ, int reason, int line, if (or_circ->p_chan) { circuit_clear_cell_queue(circ, or_circ->p_chan); /* Only send destroy if the channel isn't closing anyway */ - if (!(or_circ->p_chan->state == CHANNEL_STATE_CLOSING || - or_circ->p_chan->state == CHANNEL_STATE_CLOSED || - or_circ->p_chan->state == CHANNEL_STATE_ERROR)) { + if (!CHANNEL_CONDEMNED(or_circ->p_chan)) { channel_send_destroy(or_circ->p_circ_id, or_circ->p_chan, reason); } circuitmux_detach_circuit(or_circ->p_chan->cmux, circ); |