[tor-commits] [tor/master] Using CHANNEL_FINISHED macro in connection.c

nickm at torproject.org nickm at torproject.org
Sun Dec 21 19:49:54 UTC 2014


commit fc7d5e598bb2494bd121e73038cf29854a23d9d5
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date:   Sun Nov 23 21:34:41 2014 +0200

    Using CHANNEL_FINISHED macro in connection.c
---
 src/or/connection.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/or/connection.c b/src/or/connection.c
index c9c371c..16b359d 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));
       }
 





More information about the tor-commits mailing list