[Git][NTPsec/ntpsec][master] Fix crash if NMEA driver can't open /dev/gpsx, Issue #299
Hal Murray
gitlab at mg.gitlab.com
Tue May 9 10:08:36 UTC 2017
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
5301121f by Hal Murray at 2017-05-09T03:06:07-07:00
Fix crash if NMEA driver can't open /dev/gpsx, Issue #299
- - - - -
1 changed file:
- ntpd/refclock_nmea.c
Changes:
=====================================
ntpd/refclock_nmea.c
=====================================
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -481,6 +481,8 @@ nmea_start(
pp->io.fd = refclock_open(peer->path ? peer->path : device,
baudrate,
LDISC_CLK);
+ if (-1 == pp->io.fd)
+ return false;
LOGIF(CLOCKINFO, (LOG_NOTICE, "%s serial %s open at %s bps",
refclock_name(peer), device, baudtext));
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5301121f97b8e91969590b4244a58c108eadac0b
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5301121f97b8e91969590b4244a58c108eadac0b
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170509/6c1c7b2f/attachment.html>
More information about the vc
mailing list