(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.
This commit is contained in:
Markus Armbruster 2004-08-28 11:24:25 +00:00
parent 240eb32b76
commit 2eb3b4a4d2

View file

@ -128,7 +128,7 @@ min_to_next_daytime(int dtime, char *times)
if (times) { if (times) {
while (NULL != (times = daytime(times, &dt))) { while (NULL != (times = daytime(times, &dt))) {
if (dt < dtime) if (dt <= dtime)
dt += 24 * 60; /* tomorrow */ dt += 24 * 60; /* tomorrow */
if (dt < mindt) if (dt < mindt)
mindt = dt; mindt = dt;