diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-05 13:52:17 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-05 13:52:17 +0100 |
| commit | 47293a4f116e04a88b0797bafad0c98b4393b744 (patch) | |
| tree | b71d19aa8637382a6d3b453614a6a52a2c1b3245 /src/ot_accesslist.c | |
| parent | 9a3a01643fc78bf544a1e6f5ca5c7529e2026b25 (diff) | |
Clamp every elapsed time span at zero, using a set of helper functions
Diffstat (limited to 'src/ot_accesslist.c')
| -rw-r--r-- | src/ot_accesslist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ot_accesslist.c b/src/ot_accesslist.c index 86f9a7d..ea5bdba 100644 --- a/src/ot_accesslist.c +++ b/src/ot_accesslist.c | |||
| @@ -91,7 +91,7 @@ static ot_accesslist *accesslist_make(ot_accesslist *next, size_t size) { | |||
| 91 | This will never delete head, because that might still be in use. */ | 91 | This will never delete head, because that might still be in use. */ |
| 92 | static void accesslist_clean(ot_accesslist *accesslist) { | 92 | static void accesslist_clean(ot_accesslist *accesslist) { |
| 93 | while (accesslist && accesslist->next) { | 93 | while (accesslist && accesslist->next) { |
| 94 | if (accesslist->next->base + 5 < time_now_minutes()) | 94 | if (time_since_minutes(accesslist->next->base) > 5) |
| 95 | accesslist->next = accesslist_free(accesslist->next); | 95 | accesslist->next = accesslist_free(accesslist->next); |
| 96 | accesslist = accesslist->next; | 96 | accesslist = accesslist->next; |
| 97 | } | 97 | } |
