summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-02 12:19:28 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-02 12:19:28 +0000
commit16ee6830b63ef545e7c77b6594b212e07f0f95c9 (patch)
treef5e0aa9404446dc66d9ce5b80ba263a75c232cd5
parent1d474e14d7e12cc3e504f7e6d88563132d3201b7 (diff)
downloadtor-16ee6830b63ef545e7c77b6594b212e07f0f95c9.tar.gz
tor-16ee6830b63ef545e7c77b6594b212e07f0f95c9.zip
only print bandwidth lines to the state file if we're being a server.
otherwise this is pointless and probably bad for security. svn:r5704
-rw-r--r--src/or/rephist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 0d2b6cf3b4..dd68df823c 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -677,7 +677,8 @@ rep_hist_update_state(or_state_t *state)
tor_snprintf(cp, len-(cp-buf), cp == buf ? U64_FORMAT : ","U64_FORMAT,
U64_PRINTF_ARG(b->total_in_period));
*s_values = smartlist_create();
- smartlist_split_string(*s_values, buf, ",", SPLIT_SKIP_SPACE, 0);
+ if (server_mode(get_options()))
+ smartlist_split_string(*s_values, buf, ",", SPLIT_SKIP_SPACE, 0);
}
tor_free(buf);
state->dirty = 1;