[or-cvs] [ernie/master] Fix coloring of consensus parameters on consensus-health page.

karsten at torproject.org karsten at torproject.org
Tue Jul 13 06:21:51 UTC 2010


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Tue, 13 Jul 2010 08:20:57 +0200
Subject: Fix coloring of consensus parameters on consensus-health page.
Commit: 7bfa3251f5e32e5110921d783b43fe663c53efb1

---
 src/ConsensusHealthChecker.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/ConsensusHealthChecker.java b/src/ConsensusHealthChecker.java
index cf23e6a..ed53299 100644
--- a/src/ConsensusHealthChecker.java
+++ b/src/ConsensusHealthChecker.java
@@ -238,9 +238,18 @@ public class ConsensusHealthChecker {
       }
 
       /* Write consensus parameters. */
+      boolean conflict = false;
       if (voteParams == null) {
         /* Authority doesn't set consensus parameters. */
-      } else if (!voteParams.equals(consensusParams)) {
+      } else {
+        for (String param : voteParams.split(" ")) {
+          if (!consensusParams.contains(param)) {
+            conflict = true;
+            break;
+          }
+        }
+      }
+      if (conflict) {
         paramsResults.append("          <tr>\n"
             + "            <td><font color=\"red\">" + dirSource
               + "</font></td>\n"
-- 
1.7.1



More information about the tor-commits mailing list