[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Understand @type gettor annotation.
commit 4f50b4d1e1348aafa9fe1112c1ce01e8f25598a2
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu May 31 15:19:36 2012 +0200
Understand @type gettor annotation.
---
src/org/torproject/ernie/cron/GetTorProcessor.java | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/org/torproject/ernie/cron/GetTorProcessor.java b/src/org/torproject/ernie/cron/GetTorProcessor.java
index 2b5d67a..0be6e12 100644
--- a/src/org/torproject/ernie/cron/GetTorProcessor.java
+++ b/src/org/torproject/ernie/cron/GetTorProcessor.java
@@ -43,6 +43,13 @@ public class GetTorProcessor {
BufferedReader br = new BufferedReader(new FileReader(getTorFile));
String line = null;
while ((line = br.readLine()) != null) {
+ if (line.startsWith("@type ")) {
+ if (!line.startsWith("@type gettor 1.")) {
+ logger.warning("Wrong descriptor type: '" + line + "'. "
+ + "Aborting.");
+ break;
+ }
+ }
String[] parts = line.split(" ");
String date = parts[0];
try {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits