[tor-commits] [onionoo/master] Fix running field for bridges.

karsten at torproject.org karsten at torproject.org
Thu Jun 14 12:03:51 UTC 2012


commit f4f9ea778c0e84563305cbfe0e2a82243ee66273
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Thu Jun 14 14:02:36 2012 +0200

    Fix running field for bridges.
    
    Bridges got the running bit if they were contained in the last known
    status, regardless of a possibly missing Running flag.  This doesn't
    matter for relays, because all relays in the consensus have the Running
    flag.  That's not true for bridges.
---
 src/org/torproject/onionoo/CurrentNodes.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/org/torproject/onionoo/CurrentNodes.java b/src/org/torproject/onionoo/CurrentNodes.java
index c2a91ec..7ed16a8 100644
--- a/src/org/torproject/onionoo/CurrentNodes.java
+++ b/src/org/torproject/onionoo/CurrentNodes.java
@@ -305,8 +305,8 @@ public class CurrentNodes {
   public void setBridgeRunningBits() {
     if (this.lastPublishedMillis > 0L) {
       for (Node entry : this.currentBridges.values()) {
-        entry.setRunning(entry.getLastSeenMillis() ==
-            this.lastPublishedMillis);
+        entry.setRunning(entry.getRelayFlags().contains("Running") &&
+            entry.getLastSeenMillis() == this.lastPublishedMillis);
       }
     }
   }



More information about the tor-commits mailing list