[tor-commits] [tor/master] Using channel state lookup macros in circuitbias.c.

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


commit 5a7dd44d6e0996f8dec376f049551fd10b4b6b6c
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date:   Sun Nov 23 21:12:47 2014 +0200

    Using channel state lookup macros in circuitbias.c.
---
 src/or/circpathbias.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/circpathbias.c b/src/or/circpathbias.c
index a6858a3..e5e3326 100644
--- a/src/or/circpathbias.c
+++ b/src/or/circpathbias.c
@@ -768,8 +768,8 @@ pathbias_send_usable_probe(circuit_t *circ)
 
   /* Can't probe if the channel isn't open */
   if (circ->n_chan == NULL ||
-      (circ->n_chan->state != CHANNEL_STATE_OPEN
-       && circ->n_chan->state != CHANNEL_STATE_MAINT)) {
+      (!CHANNEL_IS_OPEN(circ->n_chan)
+       && !CHANNEL_IS_MAINT(circ->n_chan))) {
     log_info(LD_CIRC,
              "Skipping pathbias probe for circuit %d: Channel is not open.",
              ocirc->global_identifier);





More information about the tor-commits mailing list