]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2326] More leapsecond file notification cleanup
authorHarlan Stenn <stenn@ntp.org>
Wed, 27 Nov 2013 22:07:41 +0000 (22:07 +0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 27 Nov 2013 22:07:41 +0000 (22:07 +0000)
bk: 52966d2dqQFlnfJ0fEb1Ky_TJQvVCg

ChangeLog
ntpd/ntp_timer.c

index 4bd79cbc1f2f21082bafc3fa26c4a9e9e6792811..ff3343aa7f2eb0428f87469899ce8e2300c371c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 2326] More leapsecond file notification cleanup.
 (4.2.7p398) 2013/11/25 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 2326] More leapsecond file notification cleanup.
 * Improve sntp KoD data file fopen() error message.
index 379a2391d8168b9ac54b25e2a89ae06280402baf..0d0fbbafc13978cfa95af204f6049aadb00e9bef 100644 (file)
@@ -40,7 +40,7 @@
 #define        TC_ERR  (-1)
 #endif
 
-extern char *leapseconds_file; /*name of the leapseconds file */
+extern char *leapseconds_file; /* name of the leapseconds file */
 
 static void check_leapsec(u_int32, const time_t*, int/*BOOL*/);
 
@@ -67,8 +67,7 @@ volatile int alarm_flag;
 static  u_long interface_timer;        /* interface update timer */
 static u_long adjust_timer;    /* second timer */
 static u_long stats_timer;     /* stats timer */
-time_t check_leapfile = 0;     /* Report leapfile problems once/day */
-#define CHECK_LEAP_EVERY       86400
+static u_long check_leapfile;  /* Report leapfile problems once/day */
 static u_long huffpuff_timer;  /* huff-n'-puff timer */
 static u_long worker_idle_timer;/* next check for idle intres */
 u_long leapsec;                /* seconds to next leap (proximity class) */
@@ -191,6 +190,7 @@ init_timer(void)
        alarm_overflow = 0;
        adjust_timer = 1;
        stats_timer = HOUR;
+       check_leapfile = 0;
        huffpuff_timer = 0;
        interface_timer = 0;
        current_time = 0;
@@ -437,7 +437,7 @@ timer(void)
                        ** We only want to log stuff once/day.
                        */
                        if (check_leapfile < current_time) {
-                               check_leapfile += CHECK_LEAP_EVERY;
+                               check_leapfile += DAY;
                                if (-1 == clf) {
                                        /* nothing to do */
                                } else if (0 == clf) {