From 2eb3b4a4d21577cad5ff92d115f2f895c95e4d46 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 28 Aug 2004 11:24:25 +0000 Subject: [PATCH] (min_to_next_daytime): Happily returned zero if DTIME happend to be in TIMES. This can make callers fire another update right away, possibly several times. Observed for update policy UDP_TIMES while updates were disabled, which makes them complete in much less than a second. Fills up server.log real fast. Fix to consider DTIME tomorrow. --- src/lib/common/hours.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/common/hours.c b/src/lib/common/hours.c index 9325c4cc..47ec71d7 100644 --- a/src/lib/common/hours.c +++ b/src/lib/common/hours.c @@ -128,7 +128,7 @@ min_to_next_daytime(int dtime, char *times) if (times) { while (NULL != (times = daytime(times, &dt))) { - if (dt < dtime) + if (dt <= dtime) dt += 24 * 60; /* tomorrow */ if (dt < mindt) mindt = dt;