From: Dave Hart Date: Tue, 13 Mar 2012 09:22:37 +0000 (+0000) Subject: [Bug 2160] Note if leapseconds file is past its prime. X-Git-Tag: NTP_4_2_7P264~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=939ab475547d26bcb6983fdb0dcf45297af7ccee;p=thirdparty%2Fntp.git [Bug 2160] Note if leapseconds file is past its prime. bk: 4f5f11ddilSDmFhnmyQcw3dxkm9F2A --- diff --git a/ChangeLog b/ChangeLog index 78cd74ef8..75d13c9ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 2160] Note if leapseconds file is past its prime. * Use GetSystemTimePreciseAsFileTime() on Windows 8. (4.2.7p263) 2012/03/13 Released by Harlan Stenn * [Bug 2156] clock instability with LOCAL driver, from Miroslav Lichvar. diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c index e2a5c7705..4bd089d1d 100644 --- a/ntpd/ntp_util.c +++ b/ntpd/ntp_util.c @@ -339,6 +339,7 @@ stats_config( const char *value; int len; double old_drift; + l_fp now; #ifndef VMS const char temp_ext[] = ".TEMP"; #else @@ -480,15 +481,21 @@ stats_config( break; } - if (leap_file(fp) < 0) + if (leap_file(fp) < 0) { msyslog(LOG_ERR, "format error leapseconds file %s", value); - else + } else { + get_systime(&now); mprintf_event(EVNT_TAI, NULL, - "%d leap %s expire %s", leap_tai, + "%d leap %s %s %s", + leap_tai, fstostr(leap_sec), + (now.l_ui > leap_expire) + ? "expired" + : "expires", fstostr(leap_expire)); + } fclose(fp); break;