Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
bk: 548fef1eErMyzPTzLs2FoDye8jk3Vg
+* [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>
register struct hpgpsunit *up;
struct refclockproc *pp;
int fd;
- int ldisc;
+ int speed, ldisc;
char device[20];
/*
*/
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);
/*