mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
Merge branch 'bug22245_024'
This commit is contained in:
commit
71a21256b0
2 changed files with 6 additions and 1 deletions
5
changes/bug22245
Normal file
5
changes/bug22245
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
o Minor bugfixes (bandwidth accounting):
|
||||||
|
- Roll over monthly accounting at the configured hour and minute,
|
||||||
|
rather than always at 00:00.
|
||||||
|
Fixes bug 22245; bugfix on 0.0.9rc1.
|
||||||
|
Found by Andrey Karpov with PVS-Studio.
|
|
@ -331,7 +331,7 @@ edge_of_accounting_period_containing(time_t now, int get_end)
|
||||||
case UNIT_MONTH: {
|
case UNIT_MONTH: {
|
||||||
/* If this is before the Nth, we want the Nth of last month. */
|
/* If this is before the Nth, we want the Nth of last month. */
|
||||||
if (tm.tm_mday < cfg_start_day ||
|
if (tm.tm_mday < cfg_start_day ||
|
||||||
(tm.tm_mday < cfg_start_day && before)) {
|
(tm.tm_mday == cfg_start_day && before)) {
|
||||||
--tm.tm_mon;
|
--tm.tm_mon;
|
||||||
}
|
}
|
||||||
/* Otherwise, the month is correct. */
|
/* Otherwise, the month is correct. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue