]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Windows port: Add msyslog() on path to exit(), relax PPS timestamp
authorDave Hart <hart@ntp.org>
Tue, 18 May 2010 01:36:23 +0000 (01:36 +0000)
committerDave Hart <hart@ntp.org>
Tue, 18 May 2010 01:36:23 +0000 (01:36 +0000)
  within one minute of now check to be used only if debug tracing is
  enabled.

bk: 4bf1ef17qijNCdI1JSZZx8tRgM-00Q

ports/winnt/ntpd/nt_clockstuff.c

index b65b9ef470b02f05fd30a4386e76931a4a5d0579..52d24138335f609b85f3037ccbe7c8a3a4d2bc4b 100644 (file)
@@ -1204,14 +1204,17 @@ ntp_timestamp_from_counter(
                /* sanity check timestamp is within 1 minute of now */
                GetSystemTimeAsFileTime(&Now.ft);
                Now.ll -= InterpTimestamp;
-               if (Now.ll > 60 * HECTONANOSECONDS || 
+               if (debug &&
+                   Now.ll > 60 * HECTONANOSECONDS || 
                    Now.ll < -60 * (LONGLONG) HECTONANOSECONDS) {
-                       DPRINTF(1, ("ntp_timestamp_from_counter interpolated "
-                                   "time %.6fs from current\n",
+                       DPRINTF(1, ("ntp_timestamp_from_counter interpolated time %.6fs from current\n",
                                        Now.ll / (double)LL_HNS));
                        DPRINTF(1, ("interpol time %llx from  %llx\n",
                                        InterpTimestamp,
                                        Counterstamp));
+                       msyslog(LOG_ERR,
+                               "ntp_timestamp_from_counter interpolated time %.6fs from current\n",
+                               Now.ll / (double)LL_HNS);
                        exit(-1);
                }
 #endif