aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-01-08 18:21:10 +1000
committerteor <teor@torproject.org>2019-01-08 18:21:10 +1000
commit85c598cbc2d4ca1a7c729864002b5b222980ce19 (patch)
treeccc194275e00fc9c1c5d6dc27c9d1cca405a7ea0 /src/or/router.c
parentb5fdb91adaad7fd863856ad505665908bd24ea15 (diff)
downloadtor-85c598cbc2d4ca1a7c729864002b5b222980ce19.tar.gz
tor-85c598cbc2d4ca1a7c729864002b5b222980ce19.zip
stats: Make PaddingStatistics depend on ExtraInfoStatistics
When ExtraInfoStatistics is 0, stop including PaddingStatistics in relay and bridge extra-info documents. Fixes bug 29017; bugfix on 0.3.1.1-alpha.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/or/router.c b/src/or/router.c
index edaa040dd7..c308bcfae1 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -3304,12 +3304,11 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo,
"conn-bi-direct", now, &contents) > 0) {
smartlist_add(chunks, contents);
}
- }
-
- if (options->PaddingStatistics) {
- contents = rep_hist_get_padding_count_lines();
- if (contents)
- smartlist_add(chunks, contents);
+ if (options->PaddingStatistics) {
+ contents = rep_hist_get_padding_count_lines();
+ if (contents)
+ smartlist_add(chunks, contents);
+ }
}
/* Add information about the pluggable transports we support. */