[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit f4f9ea778c0e84563305cbfe0e2a82243ee66273
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
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);
       }
     }
   }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits