]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2314] Only enable PPS if kernel consumer binding succeeds
authorHarlan Stenn <stenn@ntp.org>
Fri, 21 Nov 2014 09:44:10 +0000 (09:44 +0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 21 Nov 2014 09:44:10 +0000 (09:44 +0000)
bk: 546f096aOlYdyTTFj2_78umE-LPKEw

ChangeLog
ntpd/ntp_refclock.c

index ad384dc0a7b93ecdb44b14be76ee1bd287379c63..991a4e87f914db2be1bab3c9f5f70139d90b5007 100644 (file)
--- 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 <stenn@ntp.org>
 * [Bug 2677] PATH_MAX isn't #define'd  under Windows.
   Regression from the patch fixing Bug 2639.
index 0e2d5c7ae98c4832fe7873731a57b53b264d6d6d..dd753b3c739e93f1692f282261df697903bf70f3 100644 (file)
@@ -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);
 }