diff options
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index d9db154a..26560cb6 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -303,11 +303,8 @@ void gpsd_init(struct gps_device_t *session, struct gps_context_t *context, /* initialize GPS polling */ { /* clear some times */ - session->last_fixtime.real = 0.0; - /*@i2@*/session->last_fixtime.clock.tv_sec = 0; - /*@i2@*/session->last_fixtime.clock.tv_nsec = 0; #ifdef PPS_ENABLE - memset((void *)&session->pps_state, 0, sizeof(session->pps_state)); + memset((void *)&session->pps_thread, 0, sizeof(session->pps_thread)); #endif /* PPS_ENABLE */ /*@ -mayaliasunique @*/ @@ -400,12 +397,9 @@ void gpsd_clear(struct gps_device_t *session) /* clear the private data union */ memset( (void *)&session->driver, '\0', sizeof(session->driver)); - /* clear some times */ - session->last_fixtime.real = 0.0; - /*@i2@*/session->last_fixtime.clock.tv_sec = 0; - /*@i2@*/session->last_fixtime.clock.tv_nsec = 0; #ifdef PPS_ENABLE - memset((void *)&session->pps_state, 0, sizeof(session->pps_state)); + /* clear some times */ + memset((void *)&session->pps_thread, 0, sizeof(session->pps_thread)); #endif /* PPS_ENABLE */ session->opentime = timestamp(); @@ -1647,7 +1641,7 @@ void ntp_latch(struct gps_device_t *device, struct timedelta_t /*@out@*/*td) #ifdef PPS_ENABLE /* thread-safe update */ /*@-compdef@*/ - status = pps_thread_stash_fixtime(&device->last_fixtime, + status = pps_thread_stash_fixtime(&device->pps_thread, device->newdata.time, td->clock); /*@+compdef@*/ if (status == PPS_LOCK_ERR) { |