Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/xntp/xntpd When peers are configured "remotely" (by...



details:   https://anonhg.NetBSD.org/src/rev/161a868435cb
branches:  trunk
changeset: 476118:161a868435cb
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Mon Sep 06 21:58:45 1999 +0000

description:
When peers are configured "remotely" (by ntp_intres.c), don't start
more than one per timer tick.  this will hopefully cause faster
convergence since the responses are less likely to pile up on top of
each other.  (they'll eventually get randomized out of synch with each
other, but there's no sense in starting them off synchronized).

diffstat:

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

diffs (30 lines):

diff -r 025d0b8ec1a0 -r 161a868435cb usr.sbin/xntp/xntpd/ntp_peer.c
--- a/usr.sbin/xntp/xntpd/ntp_peer.c    Mon Sep 06 21:54:17 1999 +0000
+++ b/usr.sbin/xntp/xntpd/ntp_peer.c    Mon Sep 06 21:58:45 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.5 1999/09/06 21:58:45 sommerfeld 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