[or-cvs] [metrics-db/master] Process w and p lines in bridge network statuses.
karsten at torproject.org
karsten at torproject.org
Tue Jan 25 07:10:01 UTC 2011
commit 4688d03b5cd0a39c86678bd3065ddc595941ecd2
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Tue Jan 25 08:08:50 2011 +0100
Process w and p lines in bridge network statuses.
---
.../ernie/db/SanitizedBridgesWriter.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/org/torproject/ernie/db/SanitizedBridgesWriter.java b/src/org/torproject/ernie/db/SanitizedBridgesWriter.java
index 5f9a55f..0b504a9 100644
--- a/src/org/torproject/ernie/db/SanitizedBridgesWriter.java
+++ b/src/org/torproject/ernie/db/SanitizedBridgesWriter.java
@@ -270,13 +270,15 @@ public class SanitizedBridgesWriter {
+ descPublicationTime + " 127.0.0.1 " + orPort + " "
+ dirPort + "\n");
- /* Nothing special about s lines; just copy them. */
- } else if (line.startsWith("s ")) {
+ /* Nothing special about s, w, and p lines; just copy them. */
+ } else if (line.startsWith("s ") || line.equals("s") ||
+ line.startsWith("w ") || line.equals("w") ||
+ line.startsWith("p ") || line.equals("p")) {
scrubbed.append(line + "\n");
- /* There should be nothing else but r and s lines in the network
- * status. If there is, we should probably learn before writing
- * anything to the sanitized descriptors. */
+ /* There should be nothing else but r, w, p, and s lines in the
+ * network status. If there is, we should probably learn before
+ * writing anything to the sanitized descriptors. */
} else {
this.logger.fine("Unknown line '" + line + "' in bridge "
+ "network status. Not writing to disk!");
More information about the tor-commits
mailing list