From: Juergen Perlinger Date: Mon, 19 Nov 2012 18:38:43 +0000 (+0100) Subject: [Bug 2306] Keep pps hack for Win32 even if user-mode/loopback PPS API is activated... X-Git-Tag: NTP_4_2_7P325~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87f9519490f66099b920c2bb80c8064407e19bf7;p=thirdparty%2Fntp.git [Bug 2306] Keep pps hack for Win32 even if user-mode/loopback PPS API is activated on a serial line. bk: 50aa7cb32nlG230T4EKaLxIwO4rH8w --- diff --git a/ChangeLog b/ChangeLog index a2dde231e..edf346f10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +* [Bug 2306] keep pps hack for Win32 even if user-mode/loopback + PPS API is activated on a serial line. (4.2.7p324) 2012/11/19 Released by Harlan Stenn * Reinstate doc fix to authentic.html from Mike T. * [Bug 1223] cleanup for rlimit changes. diff --git a/ports/winnt/ntpd/ntp_iocompletionport.c b/ports/winnt/ntpd/ntp_iocompletionport.c index 031c34c4b..ad35d5f52 100644 --- a/ports/winnt/ntpd/ntp_iocompletionport.c +++ b/ports/winnt/ntpd/ntp_iocompletionport.c @@ -796,7 +796,16 @@ OnSerialWaitComplete( ppsbuf->data = dev->pps_data; InterlockedExchange((PLONG)&dev->cov_count, covc); /* Note: InterlockedExchange() is a full barrier. */ - } else { + } + /* perlinger@ntp.org, 2012-11-19 + It can be argued that once you have the PPS API active, you can + disable the old pps hack. This would give a behaviour that's much + more like the behaviour under a UN*Xish OS. On the other hand, it + will give a nasty surprise for people which have until now happily + taken the pps hack for granted, and after the first complaint, I have + decided to keep the old implementation unconditionally. So here it is: + /*else*/ + { /* backward compat: 'usermode-pps-hack' */ if (MS_RLSD_ON & modem_status) { lpo->DCDSTime = lpo->RecvTime;