From: Dave Hart Date: Tue, 18 May 2010 01:36:23 +0000 (+0000) Subject: Windows port: Add msyslog() on path to exit(), relax PPS timestamp X-Git-Tag: NTP_4_2_7P32~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5fdc5d3ca37badb85919b6cd4d51cddb6812308;p=thirdparty%2Fntp.git Windows port: Add msyslog() on path to exit(), relax PPS timestamp within one minute of now check to be used only if debug tracing is enabled. bk: 4bf1ef17qijNCdI1JSZZx8tRgM-00Q --- diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c index b65b9ef47..52d241383 100644 --- a/ports/winnt/ntpd/nt_clockstuff.c +++ b/ports/winnt/ntpd/nt_clockstuff.c @@ -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