diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-10-24 12:51:00 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-24 14:54:22 +0200 |
commit | f885c605013bd72970159aad92ad9d9f64395a0c (patch) | |
tree | 925215acc78c3f466524848564d410e9d2c2022c /src/or/config.c | |
parent | 2e295ae46e29b6a7428867bc18882656d408f2e5 (diff) | |
download | tor-f885c605013bd72970159aad92ad9d9f64395a0c.tar tor-f885c605013bd72970159aad92ad9d9f64395a0c.tar.gz |
Don't initialize desc stats for non-bridgedirauth nodes
Also make sure that calling rep_hist_note_desc_served() while stats
aren't initialized just returns.
Bug spotted by SwissTorHelp. Thanks!
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 627e1ac5d..40ce25878 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1578,7 +1578,8 @@ options_act(const or_options_t *old_options) options->ConnDirectionStatistics) { rep_hist_conn_stats_init(now); } - if (!old_options || !old_options->BridgeAuthoritativeDir) { + if ((!old_options || !old_options->BridgeAuthoritativeDir) && + options->BridgeAuthoritativeDir) { rep_hist_desc_stats_init(now); print_notice = 1; } |