aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-02-28 08:32:13 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-28 08:32:13 -0500
commit043329eeb653b2f9e795cf8b7cfd8fb0b756dca5 (patch)
tree254725973497821e9de8390f9a0048d9736097b1 /src/or/config.c
parentbf1678603ffa66ed47c038faf309984839a98363 (diff)
parentb7d8a1e141479add9f591e4e9fc3da15baecaecd (diff)
downloadtor-043329eeb653b2f9e795cf8b7cfd8fb0b756dca5.tar
tor-043329eeb653b2f9e795cf8b7cfd8fb0b756dca5.tar.gz
Merge remote-tracking branch 'karsten/task-5824'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index d2981771c..5633696d0 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1660,10 +1660,14 @@ options_act(const or_options_t *old_options)
time_t now = time(NULL);
int print_notice = 0;
- /* If we aren't acting as a server, we can't collect stats anyway. */
+ /* Only collect directory-request statistics on relays and bridges. */
if (!server_mode(options)) {
- options->CellStatistics = 0;
options->DirReqStatistics = 0;
+ }
+
+ /* Only collect other relay-only statistics on relays. */
+ if (!public_server_mode(options)) {
+ options->CellStatistics = 0;
options->EntryStatistics = 0;
options->ExitPortStatistics = 0;
}