From: Harlan Stenn Date: Fri, 21 Nov 2014 09:44:10 +0000 (+0000) Subject: [Bug 2314] Only enable PPS if kernel consumer binding succeeds X-Git-Tag: NTP_4_2_7P481~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c16aa2070aa086a5256d5dffa4ee08e54992b418;p=thirdparty%2Fntp.git [Bug 2314] Only enable PPS if kernel consumer binding succeeds bk: 546f096aOlYdyTTFj2_78umE-LPKEw --- diff --git a/ChangeLog b/ChangeLog index ad384dc0a..991a4e87f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 2314] Only enable PPS if kernel consumer binding succeeds. (4.2.7p480) 2014/11/21 Released by Harlan Stenn * [Bug 2677] PATH_MAX isn't #define'd under Windows. Regression from the patch fixing Bug 2639. diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c index 0e2d5c7ae..dd753b3c7 100644 --- a/ntpd/ntp_refclock.c +++ b/ntpd/ntp_refclock.c @@ -578,7 +578,7 @@ refclock_gtlin( ) { const char *sp, *spend; - char *dp, *dpend; + char *dp, *dpend; int dlen; if (bmax <= 0) @@ -838,7 +838,7 @@ refclock_setup( ttyp->c_cflag = CS8 | CLOCAL | CREAD; if (lflags & LDISC_7O1) { /* HP Z3801A needs 7-bit, odd parity */ - ttyp->c_cflag = CS7 | PARENB | PARODD | CLOCAL | CREAD; + ttyp->c_cflag = CS7 | PARENB | PARODD | CLOCAL | CREAD; } cfsetispeed(&ttyb, speed); cfsetospeed(&ttyb, speed); @@ -1256,8 +1256,9 @@ refclock_params( "refclock_params: time_pps_kcbind: %m"); return (0); } + } else { + pps_enable = 1; } - pps_enable = 1; } return (1); }