diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-12-21 14:48:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-21 14:48:53 -0500 |
commit | 1c05dfd0b6ae9303d1f815a4d610655f32c0cc50 (patch) | |
tree | 62f8f15a06f49024c46eb4defff27c7286f82495 /src/or/connection_or.c | |
parent | 647a90b9b3bcec5d6cac766e6b3756d6ff1302ce (diff) | |
parent | af1469b9a3298382de39dca87b02410e829399a2 (diff) | |
download | tor-1c05dfd0b6ae9303d1f815a4d610655f32c0cc50.tar.gz tor-1c05dfd0b6ae9303d1f815a4d610655f32c0cc50.zip |
Merge branch 'ticket7356_squashed'
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index f228450723..2232a1b565 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1149,9 +1149,7 @@ connection_or_notify_error(or_connection_t *conn, if (conn->chan) { chan = TLS_CHAN_TO_BASE(conn->chan); /* Don't transition if we're already in closing, closed or error */ - if (!(chan->state == CHANNEL_STATE_CLOSING || - chan->state == CHANNEL_STATE_CLOSED || - chan->state == CHANNEL_STATE_ERROR)) { + if (!CHANNEL_CONDEMNED(chan)) { channel_close_for_error(chan); } } @@ -1310,9 +1308,7 @@ connection_or_close_normally(or_connection_t *orconn, int flush) if (orconn->chan) { chan = TLS_CHAN_TO_BASE(orconn->chan); /* Don't transition if we're already in closing, closed or error */ - if (!(chan->state == CHANNEL_STATE_CLOSING || - chan->state == CHANNEL_STATE_CLOSED || - chan->state == CHANNEL_STATE_ERROR)) { + if (!CHANNEL_CONDEMNED(chan)) { channel_close_from_lower_layer(chan); } } @@ -1333,9 +1329,7 @@ connection_or_close_for_error(or_connection_t *orconn, int flush) if (orconn->chan) { chan = TLS_CHAN_TO_BASE(orconn->chan); /* Don't transition if we're already in closing, closed or error */ - if (!(chan->state == CHANNEL_STATE_CLOSING || - chan->state == CHANNEL_STATE_CLOSED || - chan->state == CHANNEL_STATE_ERROR)) { + if (!CHANNEL_CONDEMNED(chan)) { channel_close_for_error(chan); } } |