commit 176497eea359655b99698cd603081a0e1f4965dc Author: Karsten Loesing karsten.loesing@gmx.net Date: Sun Jul 7 17:13:21 2013 +0200
Fix "running" fields in summary and details documents.
We say that a bridge is "running" if it's contained in the bridge network status, but it also needs the "Running" flag.
This worked fine for relays, because only running relays are contained in the consensus, but bridge network statuses may contain non-running bridges.
We should require the "Running" flag for both relays and bridges, just in case we fall back to a consensus method that contains non-running relays.
Fixes #9198. --- src/org/torproject/onionoo/NodeDataWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/org/torproject/onionoo/NodeDataWriter.java b/src/org/torproject/onionoo/NodeDataWriter.java index 69ce01b..723dd16 100644 --- a/src/org/torproject/onionoo/NodeDataWriter.java +++ b/src/org/torproject/onionoo/NodeDataWriter.java @@ -145,11 +145,11 @@ public class NodeDataWriter implements DescriptorListener {
public void setRunningBits() { for (NodeStatus node : this.knownNodes.values()) { - if (node.isRelay() && + if (node.isRelay() && node.getRelayFlags().contains("Running") && node.getLastSeenMillis() == this.relaysLastValidAfterMillis) { node.setRunning(true); } - if (!node.isRelay() && + if (!node.isRelay() && node.getRelayFlags().contains("Running") && node.getLastSeenMillis() == this.bridgesLastPublishedMillis) { node.setRunning(true); }
tor-commits@lists.torproject.org