From 85c598cbc2d4ca1a7c729864002b5b222980ce19 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 8 Jan 2019 18:21:10 +1000 Subject: 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. --- src/or/router.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/or') 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. */ -- cgit v1.2.3-54-g00ecf