From: Hal Murray Date: Mon, 9 Mar 2015 10:36:19 +0000 (-0400) Subject: ChangeLog, ntp_loopfilter.c: X-Git-Tag: NTP_4_3_8~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61cd570c0c1103d06bda20ab5e70b3aaa3593e5c;p=thirdparty%2Fntp.git ChangeLog, ntp_loopfilter.c: Fix for bug 2774 bk: 54fd77a3jngfeL50dXJdy_KTA6RZ5Q --- diff --git a/ChangeLog b/ChangeLog index 9030d8012..14392ea95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ + +* [Bug 2774] Unreasonably verbose printout - leap pending/warning + --- * [Bug 2728] See if C99-style structure initialization works. diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 82ff1632e..bc43cebfc 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -152,6 +152,7 @@ int kern_enable = TRUE; /* kernel support enabled */ int hardpps_enable; /* kernel PPS discipline enabled */ int ext_enable; /* external clock enabled */ int pps_stratum; /* pps stratum */ +int kernel_status; /* from ntp_adjtime */ int allow_panic = FALSE; /* allow panic correction */ int mode_ntpdate = FALSE; /* exit on first clock set */ int freq_cnt; /* initial frequency clamp */ @@ -706,7 +707,9 @@ local_clock( * the pps. In any case, fetch the kernel offset, * frequency and jitter. */ - if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) { + ntp_adj_ret = ntp_adjtime(&ntv); + if ((0 > ntp_adj_ret) || (ntp_adj_ret != kernel_status)) { + kernel_status = ntp_adj_ret; ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1); } pll_status = ntv.status;