summaryrefslogtreecommitdiff
path: root/src/or/channeltls.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/channeltls.c
parent647a90b9b3bcec5d6cac766e6b3756d6ff1302ce (diff)
parentaf1469b9a3298382de39dca87b02410e829399a2 (diff)
downloadtor-1c05dfd0b6ae9303d1f815a4d610655f32c0cc50.tar.gz
tor-1c05dfd0b6ae9303d1f815a4d610655f32c0cc50.zip
Merge branch 'ticket7356_squashed'
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 90ad1e679f..b02acdb159 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -940,13 +940,13 @@ channel_tls_handle_state_change_on_orconn(channel_tls_t *chan,
base_chan = TLS_CHAN_TO_BASE(chan);
- /* Make sure the base connection state makes sense - shouldn't be error,
- * closed or listening. */
+ /* Make sure the base connection state makes sense - shouldn't be error
+ * or closed. */
- tor_assert(base_chan->state == CHANNEL_STATE_OPENING ||
- base_chan->state == CHANNEL_STATE_OPEN ||
- base_chan->state == CHANNEL_STATE_MAINT ||
- base_chan->state == CHANNEL_STATE_CLOSING);
+ tor_assert(CHANNEL_IS_OPENING(base_chan) ||
+ CHANNEL_IS_OPEN(base_chan) ||
+ CHANNEL_IS_MAINT(base_chan) ||
+ CHANNEL_IS_CLOSING(base_chan));
/* Did we just go to state open? */
if (state == OR_CONN_STATE_OPEN) {
@@ -964,7 +964,7 @@ channel_tls_handle_state_change_on_orconn(channel_tls_t *chan,
* Not open, so from CHANNEL_STATE_OPEN we go to CHANNEL_STATE_MAINT,
* otherwise no change.
*/
- if (base_chan->state == CHANNEL_STATE_OPEN) {
+ if (CHANNEL_IS_OPEN(base_chan)) {
channel_change_state(base_chan, CHANNEL_STATE_MAINT);
}
}