Browse Source

When ntpd backs off polling due to a negative delay, tell the user how long

it will wait until the next poll.
ok henning@
OPENBSD_4_0
ckuethe 18 years ago
parent
commit
9325c20f99
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/usr.sbin/ntpd/client.c

+ 4
- 3
src/usr.sbin/ntpd/client.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.67 2006/05/25 19:25:46 henning Exp $ */
/* $OpenBSD: client.c,v 1.68 2006/05/29 20:51:54 ckuethe Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -237,9 +237,10 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
if (p->reply[p->shift].delay < 0) {
interval = error_interval();
set_next(p, interval);
log_info("reply from %s: negative delay %f",
log_info("reply from %s: negative delay %fs, "
"next query %ds",
log_sockaddr((struct sockaddr *)&p->addr->ss),
p->reply[p->shift].delay);
p->reply[p->shift].delay, interval);
return (0);
}
p->reply[p->shift].error = (T2 - T1) - (T3 - T4);


Loading…
Cancel
Save