summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-21 18:30:23 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-21 18:30:23 -0400
commita006eef564b7a6bab2c8568d54fadff20ff59365 (patch)
tree7108d5143e20e06bdae55ff0c4f759527576b569 /gpsd.c
parent07859f6adeace85f64e9c6c6c8ce188834328df5 (diff)
downloadgpsd-a006eef564b7a6bab2c8568d54fadff20ff59365.tar.gz
Restore PPS function by backing out Miroslav Lichtvar's last commit.
It came in way, way out of sequence ansd screwed something up. He may have been fixing some real problem, however. This requures investigation. All regression tests pass.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gpsd.c b/gpsd.c
index 9e5ed3f7..2e0a0a15 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1559,7 +1559,7 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed)
//gpsd_report(context.debug, LOG_PROG, "NTP: No time this packet\n");
} else if (isnan(device->newdata.time)) {
//gpsd_report(context.debug, LOG_PROG, "NTP: bad new time\n");
- } else if (device->newdata.time == device->last_fixtime.real) {
+ } else if (device->newdata.time == device->last_fixtime) {
//gpsd_report(context.debug, LOG_PROG, "NTP: Not a new time\n");
} else if (!device->ship_to_ntpd) {
//gpsd_report(context.debug, LOG_PROG, "NTP: No precision time report\n");
@@ -1590,10 +1590,7 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed)
/*@-compdef@*/
(void)ntpshm_put(device, device->shmIndex, &td);
/*@+compdef@*/
- device->last_fixtime.real = device->newdata.time;
-#ifndef S_SPLINT_S
- device->last_fixtime.clock = td.clock.tv_sec + td.clock.tv_nsec / 1e9;
-#endif /* S_SPLINT_S */
+ device->last_fixtime = device->newdata.time;
}
#endif /* NTPSHM_ENABLE */