From: Hal Murray Date: Tue, 16 Dec 2014 08:36:46 +0000 (-0500) Subject: refclock_hpgps.c, ChangeLog: X-Git-Tag: NTP_4_2_7P486_RC~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fe44f6f6316d7644f9cba66bed3371308bd238b;p=thirdparty%2Fntp.git refclock_hpgps.c, ChangeLog: Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed bk: 548fef1eErMyzPTzLs2FoDye8jk3Vg --- diff --git a/ChangeLog b/ChangeLog index 8600853ef..43294236a 100644 --- 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 * [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present. (4.2.7p484-RC) 2014/12/11 Released by Harlan Stenn diff --git a/ntpd/refclock_hpgps.c b/ntpd/refclock_hpgps.c index 1d26d2552..111f51210 100644 --- a/ntpd/refclock_hpgps.c +++ b/ntpd/refclock_hpgps.c @@ -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); /*