From: mar Date: Fri, 19 Aug 1988 18:03:00 +0000 (+0000) Subject: catch fencepost error in time checking X-Git-Tag: KREL1~205 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/6899dfbe5e154b16795e8f44ecfa6e4069b6bf31 catch fencepost error in time checking --- diff --git a/dcm/dcm.c b/dcm/dcm.c index 6ecedff7..3d2b44fb 100644 --- a/dcm/dcm.c +++ b/dcm/dcm.c @@ -348,13 +348,13 @@ struct service *svc; } if (!shost.enable || shost.hosterror || (shost.success && !shost.override && - shost.lastsuccess > svc->dfgen)) { + shost.lastsuccess >= svc->dfgen)) { if (dbg & DBG_TRACE) com_err(whoami, 0, "not updating %s:%s", svc->service, machine); goto free_mach; } if (!shost.success || shost.override || - shost.lasttry + svc->interval < tv.tv_sec) { + shost.lasttry + svc->interval <= tv.tv_sec) { lock_fd = maybe_lock_update(SMS_DIR, machine, svc->service, 1); if (lock_fd < 0) goto free_mach;