diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-09 10:22:08 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-09 10:22:08 +0000 |
commit | 4112461777ab6b35925919e6667313b7fdb2876f (patch) | |
tree | dcd0e57a2434e18946440671bf0fb23718e82c51 /usr.sbin | |
parent | f43f6dcd72555b63c0c563ef38c7b14cddd7ad44 (diff) |
when calculating the timeout for poll() we need to take the deadlines for
the outstanding queries into account
just-before-meal from the Montreal->Frankfurt flight
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/ntp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index 468d5503bd2..12c11869154 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.17 2004/07/08 15:06:13 henning Exp $ */ +/* $OpenBSD: ntp.c,v 1.18 2004/07/09 10:22:07 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -168,7 +168,9 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *conf) if (p->next > 0 && p->next <= time(NULL)) client_query(p); - if (p->deadline > 0 && p->deadline <= time(NULL)) { + if (p->deadline > 0 && p->deadline < nextaction) + nextaction = p->deadline; + if (p->deadline > 0 && p->deadline <= time(NULL)) { log_debug("no reply from %s received in time", log_sockaddr((struct sockaddr *)&p->ss)); if (p->trustlevel >= TRUSTLEVEL_BADPEER && |