]> git.pond.sub.org Git - empserver/commitdiff
(min_to_next_daytime): Happily returned zero if DTIME happend to be in
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Aug 2004 11:24:25 +0000 (11:24 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Aug 2004 11:24:25 +0000 (11:24 +0000)
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

index 9325c4cc08f2d8d7849498f7a3278a36948df685..47ec71d708bbc100bea7468006647851f68fcc2b 100644 (file)
@@ -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;