]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
refclock_hpgps.c, ChangeLog:
authorHal Murray <murray@ntp.org>
Tue, 16 Dec 2014 08:36:46 +0000 (03:36 -0500)
committerHal Murray <murray@ntp.org>
Tue, 16 Dec 2014 08:36:46 +0000 (03:36 -0500)
  Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed

bk: 548fef1eErMyzPTzLs2FoDye8jk3Vg

ChangeLog
ntpd/refclock_hpgps.c

index 8600853ef720ef6c3c80115b2b6d06b3937d784b..43294236a3c9bf54679743c683070c7e584ef2cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 2687] RefClock 26/hpgps doesn't work at default line speed
 (4.2.7p485-RC) 2014/12/12 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present.
 (4.2.7p484-RC) 2014/12/11 Released by Harlan Stenn <stenn@ntp.org>
index 1d26d25525155f76b2465cf73225e582ae467d16..111f5121063bda4ffaa3858514485878e584e8ce 100644 (file)
@@ -156,7 +156,7 @@ hpgps_start(
        register struct hpgpsunit *up;
        struct refclockproc *pp;
        int fd;
-       int ldisc;
+       int speed, ldisc;
        char device[20];
 
        /*
@@ -165,10 +165,13 @@ hpgps_start(
         */
        snprintf(device, sizeof(device), DEVICE, unit);
        ldisc = LDISC_CLK;
+       ldisc = SPEED232;
        /* mode parameter to server config line shares ttl slot */
-       if (1 == peer->ttl)
+       if (1 == peer->ttl) {
                ldisc |= LDISC_7O1;
-       fd = refclock_open(device, SPEED232Z, ldisc);
+               speed = SPEED232Z;
+       }
+       fd = refclock_open(device, speed, ldisc);
        if (fd <= 0)
                return (0);
        /*