[or-cvs] [ernie/master] Remember date _and_ time in parse history.
karsten at torproject.org
karsten at torproject.org
Mon Feb 22 20:19:27 UTC 2010
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Mon, 22 Feb 2010 21:19:07 +0100
Subject: Remember date _and_ time in parse history.
Commit: d7fde469a44a92b6e323117d857433690f4f7469
---
src/RelayDescriptorParser.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/RelayDescriptorParser.java b/src/RelayDescriptorParser.java
index bcbd1ec..e8b29fe 100644
--- a/src/RelayDescriptorParser.java
+++ b/src/RelayDescriptorParser.java
@@ -100,10 +100,11 @@ public class RelayDescriptorParser {
} else if (line.startsWith("extra-info ")
&& directories.contains(line.split(" ")[2])) {
String dir = line.split(" ")[2];
- String date = null, v3ips = null;
+ String statsEnd = null, date = null, v3ips = null;
boolean skip = false;
while ((line = br.readLine()) != null) {
if (line.startsWith("dirreq-stats-end ")) {
+ statsEnd = line.split(" ")[1] + " " + line.split(" ")[2];
date = line.split(" ")[1];
// trusted had very strange dirreq-v3-shares here...
skip = dir.equals("8522EB98C91496E80EC238E732594D1509158E77")
@@ -126,8 +127,9 @@ public class RelayDescriptorParser {
line.length() - 1);
dsfh.addObs(dir, date, obs, share);
if (!this.lastParsedExtraInfos.containsKey(dir) ||
- date.compareTo(this.lastParsedExtraInfos.get(dir)) > 0) {
- this.lastParsedExtraInfos.put(dir, date);
+ statsEnd.compareTo(
+ this.lastParsedExtraInfos.get(dir)) > 0) {
+ this.lastParsedExtraInfos.put(dir, statsEnd);
relayDescriptorParseHistoryModified = true;
}
}
--
1.6.5
More information about the tor-commits
mailing list