[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH 2/5] ntpd: don't reset polling interval unnecessarily
From:       Miroslav Lichvar <mlichvar () redhat ! com>
Date:       2014-09-18 14:19:04
Message-ID: 1411049947-6871-3-git-send-email-mlichvar () redhat ! com
[Download RAW message or body]

Don't reset the polling interval to the minimum when all peers are
unreachable or the clock was stepped to avoid frequent polling.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
---
 networking/ntpd.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/networking/ntpd.c b/networking/ntpd.c
index 3c708c1..fa90b20 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1446,15 +1446,13 @@ update_local_clock(peer_t *p)
 		 * is always suppressed, even at the longer poll
 		 * intervals.
 		 */
-		VERB4 bb_error_msg("stepping time by %+f; poll_exp=MINPOLL", offset);
+		VERB4 bb_error_msg("stepping time by %+f", offset);
 		step_time(offset);
 		if (option_mask32 & OPT_q) {
 			/* We were only asked to set time once. Done. */
 			exit(0);
 		}
 
-		G.polladj_count = 0;
-		G.poll_exp = MINPOLL;
 		G.stratum = MAXSTRAT;
 
 		run_script("step", offset);
@@ -2337,8 +2335,6 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv)
 					goto have_reachable_peer;
 			}
 			/* No peer responded for last 8 packets, panic */
-			G.polladj_count = 0;
-			G.poll_exp = MINPOLL;
 			G.stratum = MAXSTRAT;
 			run_script("unsync", 0.0);
  have_reachable_peer: ;
-- 
1.9.3

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic