diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-04-16 14:48:46 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@gmail.com> | 2011-04-16 14:48:46 +0200 |
commit | c2d9d80a072ab586ba97159f1d401b9ed2980b2d (patch) | |
tree | 0eb44c20d319d6f5f57aedc62267bc21852d979d /src/or/status.c | |
parent | 1db6eb6cb7db46d8dde482f629fbc1c578310d52 (diff) | |
download | tor-c2d9d80a072ab586ba97159f1d401b9ed2980b2d.tar.gz tor-c2d9d80a072ab586ba97159f1d401b9ed2980b2d.zip |
Reuse get_bytes_{read,written}() in status.c
Diffstat (limited to 'src/or/status.c')
-rw-r--r-- | src/or/status.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/status.c b/src/or/status.c index 054567f4b7..3a51c8b0a7 100644 --- a/src/or/status.c +++ b/src/or/status.c @@ -78,7 +78,6 @@ bytes_to_usage(uint64_t bytes) int log_heartbeat(time_t now) { - uint64_t in,out; char *bw_sent = NULL; char *bw_rcvd = NULL; char *uptime = NULL; @@ -99,10 +98,9 @@ log_heartbeat(time_t now) "in the cached consensus."); } - get_traffic_stats(&in, &out); uptime = secs_to_uptime(get_uptime()); - bw_sent = bytes_to_usage(out); - bw_rcvd = bytes_to_usage(in); + bw_rcvd = bytes_to_usage(get_bytes_read()); + bw_sent = bytes_to_usage(get_bytes_written()); log_fn(LOG_NOTICE, LD_HEARTBEAT, "Heartbeat: Tor's uptime is %s, with %d " "circuits open. I've pushed %s and received %s.", |