diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2014-11-23 21:02:00 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-21 14:48:38 -0500 |
commit | 668edc51323e507be88b50fb8a49f20bef779bc8 (patch) | |
tree | 59115a248824dd69f06c6000e49691f74fe66bfc /src/or/channeltls.c | |
parent | 032d44226ec618c106c0431c39a79303fb78fc6b (diff) | |
download | tor-668edc51323e507be88b50fb8a49f20bef779bc8.tar.gz tor-668edc51323e507be88b50fb8a49f20bef779bc8.zip |
Using channel state lookup macros in channeltls.c
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r-- | src/or/channeltls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c index db044aee56..987dd9b31b 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -855,10 +855,10 @@ channel_tls_handle_state_change_on_orconn(channel_tls_t *chan, /* Make sure the base connection state makes sense - shouldn't be error, * closed or listening. */ - 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) { @@ -872,7 +872,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); } } |