diff options
Diffstat (limited to 'src/or/status.c')
-rw-r--r-- | src/or/status.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/status.c b/src/or/status.c index c4156d0cc3..daae1d71c6 100644 --- a/src/or/status.c +++ b/src/or/status.c @@ -145,10 +145,14 @@ log_accounting(const time_t now, const or_options_t *options) or_state_t *state = get_or_state(); char *acc_rcvd = bytes_to_usage(state->AccountingBytesReadInInterval); char *acc_sent = bytes_to_usage(state->AccountingBytesWrittenInInterval); - char *acc_max = bytes_to_usage(options->AccountingMax); + uint64_t acc_bytes = options->AccountingMax; + char *acc_max; time_t interval_end = accounting_get_end_time(); char end_buf[ISO_TIME_LEN + 1]; char *remaining = NULL; + if (options->AccountingRule == ACCT_SUM) + acc_bytes *= 2; + acc_max = bytes_to_usage(acc_bytes); format_local_iso_time(end_buf, interval_end); remaining = secs_to_uptime(interval_end - now); |