[or-cvs] only print bandwidth lines to the state file if we"re being...
arma at seul.org
arma at seul.org
Mon Jan 2 12:19:30 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
rephist.c
Log Message:
only print bandwidth lines to the state file if we're being a server.
otherwise this is pointless and probably bad for security.
Index: rephist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/rephist.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -p -d -r1.77 -r1.78
--- rephist.c 2 Jan 2006 00:42:19 -0000 1.77
+++ rephist.c 2 Jan 2006 12:19:28 -0000 1.78
@@ -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;
More information about the tor-commits
mailing list