Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/xntp/xntpd pull up rev 1.5 from trunk (request...



details:   https://anonhg.NetBSD.org/src/rev/7ca9d7f2ddef
branches:  netbsd-1-4
changeset: 469564:7ca9d7f2ddef
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sun Oct 10 23:20:40 1999 +0000

description:
pull up rev 1.5 from trunk (requested by sommerfeld):
  Don't start all peers simultaneously if using DNS names in ntp.conf.

diffstat:

 usr.sbin/xntp/xntpd/ntp_peer.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r ed77d27ebb61 -r 7ca9d7f2ddef usr.sbin/xntp/xntpd/ntp_peer.c
--- a/usr.sbin/xntp/xntpd/ntp_peer.c    Sun Oct 10 23:17:23 1999 +0000
+++ b/usr.sbin/xntp/xntpd/ntp_peer.c    Sun Oct 10 23:20:40 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_peer.c,v 1.4 1998/08/12 14:11:53 christos Exp $    */
+/*     $NetBSD: ntp_peer.c,v 1.4.2.1 1999/10/10 23:20:40 cgd Exp $     */
 
 /*
  * ntp_peer.c - management of data maintained for peer associations
@@ -548,8 +548,8 @@
        peer->event_timer.peer = peer;
        peer->event_timer.event_handler = transmit;
 
+       init_peer_starttime += (1 << EVENT_TIMEOUT);
        if (initializing) {
-               init_peer_starttime += (1 << EVENT_TIMEOUT);
                if (init_peer_starttime >= (u_long)(1 << peer->minpoll))
                        init_peer_starttime = (1 << EVENT_TIMEOUT);
                peer->event_timer.event_time = init_peer_starttime;
@@ -559,6 +559,10 @@
                 */
                peer->event_timer.event_time
                    = (1 << (peer->minpoll - 1)) + current_time;
+               if (peer->event_timer.event_time < init_peer_starttime) {
+                       peer->event_timer.event_time = init_peer_starttime;
+               }
+               init_peer_starttime = peer->event_timer.event_time;
        }
        TIMER_ENQUEUE(timerqueue, &peer->event_timer);
 #ifdef REFCLOCK



Home | Main Index | Thread Index | Old Index