summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-04-01 03:49:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-04-01 03:49:53 -0400
commitb72e52abcec878350f5c522d243a643cb0ebcc92 (patch)
tree90f56861f07f7a9e67c5fcd544f092efe8fd4c68 /gpsmon.c
parent224469fbfd1dedccb298263173d5fcd199e0f128 (diff)
downloadgpsd-b72e52abcec878350f5c522d243a643cb0ebcc92.tar.gz
Clean up PPS monitor interface with renames, and additional documentation.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 8a3c8167..81d5c90b 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -777,8 +777,12 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
(void)snprintf(buf, sizeof(buf),
"------------------- PPS offset: %.20s ------\n ",
timedelta_str);
+ /*
+ * In direct mode this would be a bad idea, but we're not actually
+ * watching for handshake events on a spawned thread here.
+ */
/* coverity[missing_lock] */
- session.pps_thread.ppsout_last = noclobber.pps;
+ session.pps_thread.pps_out = noclobber.pps;
/* coverity[missing_lock] */
session.pps_thread.ppsout_count++;
}
@@ -834,7 +838,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
if ( 0 != isnan(device->newdata.time)) {
// "NTP: bad new time
#if defined(PPS_ENABLE)
- } else if (device->newdata.time <= device->pps_thread.fixin.real.tv_sec) {
+ } else if (device->newdata.time <= device->pps_thread.fix_in.real.tv_sec) {
// "NTP: Not a new time
#endif /* PPS_ENABLE */
} else