aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2010-08-24 08:11:17 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2010-12-03 16:47:53 +0100
commit8db10c6d2fb0dc632f3bfdcc4a9acc5e3c7ad515 (patch)
treecb4c61bb6a325c6ef35e2dfe6966b9a2456cca9c /src/or
parent91fec693e01cf5ef77fddca48ed4c0ba4fcd0d1a (diff)
downloadtor-8db10c6d2fb0dc632f3bfdcc4a9acc5e3c7ad515.tar
tor-8db10c6d2fb0dc632f3bfdcc4a9acc5e3c7ad515.tar.gz
Write bidirectional connection stats in single line.
There's no need to have a separate line conn-stats-end for the end date and interval length with only a single line conn-bi-direct following.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/rephist.c3
-rw-r--r--src/or/router.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index e6398194f..ce2dd337e 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -2592,8 +2592,7 @@ rep_hist_format_conn_stats(time_t now)
return NULL; /* Not initialized. */
format_iso_time(written, now);
- tor_asprintf(&result, "conn-stats-end %s (%d s)\n"
- "conn-bi-direct %d,%d,%d,%d\n",
+ tor_asprintf(&result, "conn-bi-direct %s (%d s) %d,%d,%d,%d\n",
written,
(unsigned) (now - start_of_conn_stats_interval),
below_threshold,
diff --git a/src/or/router.c b/src/or/router.c
index 8c56bc49a..686151a64 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2053,7 +2053,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo,
}
if (options->ConnDirectionStatistics &&
load_stats_file("stats"PATH_SEPARATOR"conn-stats",
- "conn-stats-end", now, &contents) > 0) {
+ "conn-bi-direct", now, &contents) > 0) {
size_t pos = strlen(s);
if (strlcpy(s + pos, contents, maxlen - strlen(s)) !=
strlen(contents)) {