summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-09-28 23:23:39 -0400
committerRoger Dingledine <arma@torproject.org>2009-09-28 23:23:39 -0400
commitb4709066c9da484f83755bad5221f70b0a91f7dc (patch)
tree0191b3600aba39e8cac517caf0be8d005e615ed1
parent3e82981795388c1b6dd13b5ab829321048682c15 (diff)
parent94b57f9f3640b239762a53a9e876bc02baf24a0e (diff)
downloadtor-b4709066c9da484f83755bad5221f70b0a91f7dc.tar.gz
tor-b4709066c9da484f83755bad5221f70b0a91f7dc.zip
Merge commit 'karsten/fix-another-stats-bug'
-rw-r--r--src/or/router.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 085a597ea2..7646fdc1a3 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1903,11 +1903,11 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
if (options->ExtraInfoStatistics && write_stats_to_extrainfo) {
char *contents = NULL;
- time_t since = time(NULL) - (24*60*60);
+ time_t now = time(NULL);
log_info(LD_GENERAL, "Adding stats to extra-info descriptor.");
if (options->DirReqStatistics &&
load_stats_file("stats"PATH_SEPARATOR"dirreq-stats",
- "dirreq-stats-end", since, &contents) > 0) {
+ "dirreq-stats-end", now, &contents) > 0) {
size_t pos = strlen(s);
if (strlcpy(s + pos, contents, maxlen - strlen(s)) !=
strlen(contents)) {
@@ -1919,7 +1919,7 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
}
if (options->EntryStatistics &&
load_stats_file("stats"PATH_SEPARATOR"entry-stats",
- "entry-stats-end", since, &contents) > 0) {
+ "entry-stats-end", now, &contents) > 0) {
size_t pos = strlen(s);
if (strlcpy(s + pos, contents, maxlen - strlen(s)) !=
strlen(contents)) {
@@ -1931,7 +1931,7 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
}
if (options->CellStatistics &&
load_stats_file("stats"PATH_SEPARATOR"buffer-stats",
- "cell-stats-end", since, &contents) > 0) {
+ "cell-stats-end", now, &contents) > 0) {
size_t pos = strlen(s);
if (strlcpy(s + pos, contents, maxlen - strlen(s)) !=
strlen(contents)) {
@@ -1943,7 +1943,7 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
}
if (options->ExitPortStatistics &&
load_stats_file("stats"PATH_SEPARATOR"exit-stats",
- "exit-stats-end", since, &contents) > 0) {
+ "exit-stats-end", now, &contents) > 0) {
size_t pos = strlen(s);
if (strlcpy(s + pos, contents, maxlen - strlen(s)) !=
strlen(contents)) {