[tor-commits] [onionoo/master] Keep parse history for server descriptors.

karsten at torproject.org karsten at torproject.org
Fri Jul 12 19:10:00 UTC 2013


commit cdf8d4048dfd004ba02fdf133d2bbb4824a4b73f
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Thu Jul 11 14:18:19 2013 +0200

    Keep parse history for server descriptors.
---
 src/org/torproject/onionoo/DescriptorSource.java |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/org/torproject/onionoo/DescriptorSource.java b/src/org/torproject/onionoo/DescriptorSource.java
index 5868f0f..89fd1de 100644
--- a/src/org/torproject/onionoo/DescriptorSource.java
+++ b/src/org/torproject/onionoo/DescriptorSource.java
@@ -40,9 +40,11 @@ interface DescriptorListener {
 
 enum DescriptorHistory {
   RELAY_CONSENSUS_HISTORY,
+  RELAY_SERVER_HISTORY,
   RELAY_EXTRAINFO_HISTORY,
   EXIT_LIST_HISTORY,
   BRIDGE_STATUS_HISTORY,
+  BRIDGE_SERVER_HISTORY,
   BRIDGE_EXTRAINFO_HISTORY,
   BRIDGE_POOLASSIGN_HISTORY,
 }
@@ -133,6 +135,12 @@ class DescriptorQueue {
     case BRIDGE_STATUS_HISTORY:
       historyFileName = "bridge-status-history";
       break;
+    case RELAY_SERVER_HISTORY:
+      historyFileName = "relay-server-history";
+      break;
+    case BRIDGE_SERVER_HISTORY:
+      historyFileName = "bridge-server-history";
+      break;
     default:
       System.err.println("Unknown descriptor history.  Not excluding "
           + "files.");
@@ -272,9 +280,8 @@ public class DescriptorSource {
   }
 
   public void readRelayServerDescriptors() {
-    // TODO Use parse history as soon as all listeners can handle it.
-    this.readDescriptors(DescriptorType.RELAY_SERVER_DESCRIPTORS, null,
-        true);
+    this.readDescriptors(DescriptorType.RELAY_SERVER_DESCRIPTORS,
+        DescriptorHistory.RELAY_SERVER_HISTORY, true);
   }
 
   public void readRelayExtraInfos() {
@@ -293,9 +300,8 @@ public class DescriptorSource {
   }
 
   public void readBridgeServerDescriptors() {
-    // TODO Use parse history as soon as all listeners can handle it.
-    this.readDescriptors(DescriptorType.BRIDGE_SERVER_DESCRIPTORS, null,
-        false);
+    this.readDescriptors(DescriptorType.BRIDGE_SERVER_DESCRIPTORS,
+        DescriptorHistory.BRIDGE_SERVER_HISTORY, false);
   }
 
   public void readBridgeExtraInfos() {



More information about the tor-commits mailing list