aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-12-21 14:48:53 -0500
committerNick Mathewson <nickm@torproject.org>2014-12-21 14:48:53 -0500
commit1c05dfd0b6ae9303d1f815a4d610655f32c0cc50 (patch)
tree62f8f15a06f49024c46eb4defff27c7286f82495 /src/or/circuitlist.c
parent647a90b9b3bcec5d6cac766e6b3756d6ff1302ce (diff)
parentaf1469b9a3298382de39dca87b02410e829399a2 (diff)
downloadtor-1c05dfd0b6ae9303d1f815a4d610655f32c0cc50.tar.gz
tor-1c05dfd0b6ae9303d1f815a4d610655f32c0cc50.zip
Merge branch 'ticket7356_squashed'
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 0e88b47676..affb015177 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);