From: rl1987 Date: Sun, 23 Nov 2014 19:34:41 +0000 (+0200) Subject: Using CHANNEL_FINISHED macro in connection.c X-Git-Tag: tor-0.2.6.2-alpha~46^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc7d5e598bb2494bd121e73038cf29854a23d9d5;p=thirdparty%2Ftor.git Using CHANNEL_FINISHED macro in connection.c --- diff --git a/src/or/connection.c b/src/or/connection.c index c9c371c001..16b359d5ed 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -544,8 +544,7 @@ connection_free_(connection_t *conn) or_conn, TLS_CHAN_TO_BASE(or_conn->chan), U64_PRINTF_ARG( TLS_CHAN_TO_BASE(or_conn->chan)->global_identifier)); - if (!(TLS_CHAN_TO_BASE(or_conn->chan)->state == CHANNEL_STATE_CLOSED || - TLS_CHAN_TO_BASE(or_conn->chan)->state == CHANNEL_STATE_ERROR)) { + if (!CHANNEL_FINISHED(TLS_CHAN_TO_BASE(or_conn->chan))) { channel_close_for_error(TLS_CHAN_TO_BASE(or_conn->chan)); }