diff options
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 9444c86f..10d35d8d 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -1127,10 +1127,14 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) * devices output fix packets on a regular basis, even when unable * to derive a good fix. Such packets should set STATUS_NO_FIX. */ - if ((session->gpsdata.set & LATLON_SET) != 0 - && session->gpsdata.status > STATUS_NO_FIX) { - session->context->fixcnt++; - session->fixcnt++; + if ( 0 != session->gpsdata.set & LATLON_SET) { + if ( session->gpsdata.status > STATUS_NO_FIX) { + session->context->fixcnt++; + session->fixcnt++; + } else { + session->context->fixcnt = 0; + session->fixcnt = 0; + } } /* |