[or-cvs] [ernie/master] Don't break if trusted's dirreq share is zero.

karsten at torproject.org karsten at torproject.org
Sun May 30 16:43:43 UTC 2010


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Sun, 30 May 2010 18:42:14 +0200
Subject: Don't break if trusted's dirreq share is zero.
Commit: f330a7a199abe8925a10a36edf26800bf798b1b6

---
 R/dirreq-stats.R |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/R/dirreq-stats.R b/R/dirreq-stats.R
index b44dadb..185c91a 100644
--- a/R/dirreq-stats.R
+++ b/R/dirreq-stats.R
@@ -152,9 +152,10 @@ if (file.exists("stats/dirreq-stats")) {
       "F2044413DAC2E02E3D6BCF4735A19BCA1DE97281"))
   gabelmoo <- data.frame(date = gabelmooSub$date,
     gabelmooSub[3:(length(gabelmooSub) - 1)] * 6)
-  trustedSub <- subset(dirreq,
-    directory %in% "8522EB98C91496E80EC238E732594D1509158E77")
-  trustedSub[na.omit(trustedSub$share) == 0,3:length(trustedSub)] <- NA
+  trustedSub <- dirreq[dirreq$directory ==
+    "8522EB98C91496E80EC238E732594D1509158E77",]
+  trustedSub[!is.na(trustedSub$share) & trustedSub$share < 0.01,
+    3:length(trustedSub)] <- NA
   trusted <- data.frame(date = trustedSub$date,
     floor(trustedSub[3:(length(trustedSub) - 1)] / trustedSub$share * 10))
 
-- 
1.6.5



More information about the tor-commits mailing list