]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Using channel state lookup macros in circuitbias.c.
authorrl1987 <rl1987@sdf.lonestar.org>
Sun, 23 Nov 2014 19:12:47 +0000 (21:12 +0200)
committerNick Mathewson <nickm@torproject.org>
Sun, 21 Dec 2014 19:48:38 +0000 (14:48 -0500)
src/or/circpathbias.c

index a6858a34602da67510f7ddafc39147a4fe635978..e5e3326ca1e6d0da822d35dfd27816f78ab7153d 100644 (file)
@@ -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);