From 47293a4f116e04a88b0797bafad0c98b4393b744 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 5 Nov 2026 13:52:17 +0100 Subject: Clamp every elapsed time span at zero, using a set of helper functions --- src/ot_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ot_http.c') diff --git a/src/ot_http.c b/src/ot_http.c index 96b8f4e..533a876 100644 --- a/src/ot_http.c +++ b/src/ot_http.c @@ -414,7 +414,7 @@ static ssize_t http_handle_fullscrape(const int64_t sock, struct ot_workstruct * pthread_mutex_unlock(&g_modest_fullscrape_mutex); HTTPERROR_500; } - if (exactmatch && (this_peer.last_fullscrape - new_peer->last_fullscrape) < OT_MODEST_PEER_TIMEOUT) { + if (exactmatch && time_since_seconds(new_peer->last_fullscrape) < OT_MODEST_PEER_TIMEOUT) { pthread_mutex_unlock(&g_modest_fullscrape_mutex); HTTPERROR_402_NOTMODEST; } -- cgit v1.3