]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Changes from Dave Mills
authorHarlan Stenn <stenn@ntp.org>
Thu, 24 Mar 2005 05:54:17 +0000 (00:54 -0500)
committerHarlan Stenn <stenn@ntp.org>
Thu, 24 Mar 2005 05:54:17 +0000 (00:54 -0500)
bk: 42425609KCnHbQCgzRj6XoApUJUaEw

ntpd/ntp_loopfilter.c
ntpd/ntp_proto.c

index 68dde790182cfa6129d3842dcc2d3b3b3158af2b..7afea0307786e7786594532d5162a50ef668c50c 100644 (file)
@@ -390,7 +390,6 @@ local_clock(
                            fp_offset);
                        reinit_timer();
                        tc_counter = 0;
-                       sys_poll = NTP_MINPOLL;
                        rval = 2;
                        if (state == S_NSET) {
                                rstclock(S_FREQ, peer->epoch, 0);
@@ -648,7 +647,7 @@ local_clock(
                        tc_counter = CLOCK_LIMIT;
                        if (sys_poll < peer->maxpoll) {
                                tc_counter = 0;
-                                       sys_poll++;
+                               sys_poll++;
                        }
                }
        } else {
index 84b9482b946733933990a3283b3b4ce93e96a41d..16573095cd5e995f11c549a0fd3e7e86e27445d4 100644 (file)
@@ -170,7 +170,7 @@ transmit(
                         * unreachable, raise a trap. If ephemeral, dump
                         * it right away.
                         */
-                       if (oreach != 0) {
+                       if (oreach) {
                                report_event(EVNT_UNREACH, peer);
                                if (!(peer->flags & FLAG_CONFIG)) {
                                        unpeer(peer);
@@ -1124,15 +1124,7 @@ process_packet(
                report_event(EVNT_REACH, peer);
                peer->timereachable = current_time;
        }
-
-       /*
-        * If we have gone a long time since the last packet, clamp down
-        * the poll interval to speed up resynchronization.
-        */
-       if (!peer->reach && peer->unreach > NTP_UNREACH)
-               poll_update(peer, peer->minpoll);
-       else
-               poll_update(peer, peer->hpoll);
+       poll_update(peer, peer->hpoll);
        peer->reach |= 1;
 
        /*
@@ -1349,7 +1341,7 @@ poll_update(
 
        /*
         * A manycast server beacons at minpoll until a sufficient
-        * number of servers have been found or the ttl has toped out,
+        * number of servers have been found or the ttl has topped out,
         * then beacons at maxpoll.
         */
        } else if (peer->cast_flags & MDF_ACAST) {
@@ -1842,6 +1834,7 @@ clock_select(void)
                        for (i = nl3 - 1; i >= 0; i--) {
                                if (e >= endpoint[indx[i]].val)
                                        break;
+
                                indx[i + 3] = indx[i];
                        }
                        indx[i + 3] = nl3;
@@ -1852,6 +1845,7 @@ clock_select(void)
                        for (; i >= 0; i--) {
                                if (e >= endpoint[indx[i]].val)
                                        break;
+
                                indx[i + 2] = indx[i];
                        }
                        indx[i + 2] = nl3;
@@ -1862,6 +1856,7 @@ clock_select(void)
                        for (; i >= 0; i--) {
                                if (e >= endpoint[indx[i]].val)
                                        break;
+
                                indx[i + 1] = indx[i];
                        }
                        indx[i + 1] = nl3;