From 89ba451e0a76682e5a1b499f894d1b21b6e38198 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Tue, 31 Mar 2015 15:10:04 -0700 Subject: Another small step to /dev/ppsX. ppsthread now looping fine, no time yet. --- libgpsd_core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index a674ae9d..58bdc805 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -554,6 +554,10 @@ int gpsd_activate(struct gps_device_t *session, const int mode) // cppcheck-suppress pointerLessThanZero if (session->gpsdata.gps_fd < 0) { /* return could be -1, PLACEHOLDING_FD, of UNALLOCATED_FD */ + if ( PLACEHOLDING_FD == session->gpsdata.gps_fd ) { + /* it is /dev/ppsX, need to set devicename, etc. */ + gpsd_clear(session); + } return session->gpsdata.gps_fd; } -- cgit v1.2.1