diff options
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |