diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-12-07 23:20:10 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-12-07 23:20:10 +0000 |
commit | fc8a2596e189ad8913d81b0c626d9dc3c4906f15 (patch) | |
tree | 17e127e17969be4f86a30d8c60b852a9ab1d215e /src | |
parent | ca95ed74ac2d7b2465b9353517db7ed66d0e72e9 (diff) | |
download | tor-fc8a2596e189ad8913d81b0c626d9dc3c4906f15.tar.gz tor-fc8a2596e189ad8913d81b0c626d9dc3c4906f15.zip |
Log contents of bw_accounting when we read it; fix memory leak.
svn:r3118
Diffstat (limited to 'src')
-rw-r--r-- | src/or/hibernate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c index d056bee427..67b9423130 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -605,6 +605,16 @@ read_bandwidth_usage(void) interval_start_time = t1; expected_bandwidth_usage = expected_bw; + log_fn(LOG_INFO, "Successfully read bandwidth accounting file written at %s for interval starting at %s. We have been active for %lu seconds in this interval. At the start of the interval, we expected to use about %lu KB per second. ("U64_FORMAT" bytes read so far, "U64_FORMAT" bytes written so far)", + (char*)smartlist_get(elts,2), + (char*)smartlist_get(elts,1), + (unsigned long)n_seconds_active_in_interval, + (unsigned long)((uint64_t)expected_bandwidth_usage*1024/60), + n_bytes_read_in_interval, + n_bytes_written_in_interval); + SMARTLIST_FOREACH(elts, char *, cp, tor_free(cp)); + smartlist_free(elts); + return 0; err: SMARTLIST_FOREACH(elts, char *, cp, tor_free(cp)); |