[PATCH 2/5] ntpd: don't reset polling interval unnecessarily
Miroslav Lichvar
mlichvar at redhat.com
Thu Sep 18 14:19:04 UTC 2014
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 at 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
More information about the busybox
mailing list