[tor-commits] [tor/master] Using CHANNEL_IS_OPEN macro in circuitbuild.c

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


commit 74731607651998bc6bdce9559c3352d57c60008c
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date:   Sun Nov 23 21:17:15 2014 +0200

    Using CHANNEL_IS_OPEN macro in circuitbuild.c
---
 src/or/circuitbuild.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 42c4870..847a0c0 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -671,7 +671,7 @@ circuit_deliver_create_cell(circuit_t *circ, const create_cell_t *create_cell,
   if (CIRCUIT_IS_ORIGIN(circ)) {
     /* Update began timestamp for circuits starting their first hop */
     if (TO_ORIGIN_CIRCUIT(circ)->cpath->state == CPATH_STATE_CLOSED) {
-      if (circ->n_chan->state != CHANNEL_STATE_OPEN) {
+      if (!CHANNEL_IS_OPEN(circ->n_chan)) {
         log_warn(LD_CIRC,
                  "Got first hop for a circuit without an opened channel. "
                  "State: %s.", channel_state_to_string(circ->n_chan->state));





More information about the tor-commits mailing list