From f405f9b6140d9f001bb96364dc4c240afc222103 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 19 Dec 2007 04:58:58 +0000 Subject: Make getinfo ns/purpose/bridge actually work Also, dump our bridge router status entries to disk every 30 minutes. svn:r12871 --- src/or/rephist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/or/rephist.c') diff --git a/src/or/rephist.c b/src/or/rephist.c index 1561540d02..2c84e40c2f 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -2153,21 +2153,21 @@ hs_usage_format_statistics(void) return buf; } -/** Writes current statistics to file. */ +/** Write current statistics about hidden service usage to file. */ void hs_usage_write_statistics_to_file(time_t now) { char *buf; size_t len; char *fname; - or_options_t *options; + or_options_t *options = get_options(); /* check if we are up-to-date */ hs_usage_check_if_current_period_is_up_to_date(now); buf = hs_usage_format_statistics(); - options = get_options(); len = strlen(options->DataDirectory) + 16; fname = tor_malloc(len); - tor_snprintf(fname,len, "%s"PATH_SEPARATOR"hsusage", options->DataDirectory); + tor_snprintf(fname, len, "%s"PATH_SEPARATOR"hsusage", + options->DataDirectory); write_str_to_file(fname,buf,0); tor_free(buf); tor_free(fname); -- cgit v1.2.3-54-g00ecf