summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-17 10:04:46 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-17 10:04:46 -0500
commitbb23daaa007705d0751e3c386da4a0fb542a91a1 (patch)
tree0ab8802f730c230ff32ed9990b19423f57a14076
parent102f05a4e93d592386b40974bea0b3f5a8d648da (diff)
downloadgpsd-bb23daaa007705d0751e3c386da4a0fb542a91a1.tar.gz
Try to ensure that threads don't keep running after gpsd is signalled.
-rw-r--r--TODO4
-rw-r--r--gpsd.c4
-rw-r--r--libgpsd_core.c3
3 files changed, 11 insertions, 0 deletions
diff --git a/TODO b/TODO
index d07888cb..aac974e3 100644
--- a/TODO
+++ b/TODO
@@ -48,6 +48,10 @@ The second 'n' is losing information that it shouldn't.
Display update should not stop while this is going on.
+*** Speed, mode and rate-changes in client-mode JSON.
+
+Are not implemented. In theory they could be.
+
*** Dispatcher/network issues
**** Reading AISHub data via UDP confuses xgps with short writes
diff --git a/gpsd.c b/gpsd.c
index 95dbc98c..de176c1e 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2421,6 +2421,10 @@ int main(int argc, char *argv[])
(void)gpsd_wrap(&devices[dfd]);
}
+#ifdef PPS_ENABLE
+ context.pps_hook = NULL; /* tell any PPS-watcher thread to die */
+#endif /* PPS_ENABLE */
+
gpsd_report(context.debug, LOG_WARN, "exiting.\n");
#ifdef SOCKET_EXPORT_ENABLE
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 55ccc0ae..a1040019 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -326,6 +326,9 @@ void gpsd_deactivate(struct gps_device_t *session)
gpsd_run_device_hook(session->context->debug,
session->gpsdata.dev.path,
"DEACTIVATE");
+#ifdef PPS_ENABLE
+ session->thread_report_hook = NULL; /* tell any PPS-watcher thread to die */
+#endif /* PPS_ENABLE */
/* mark it inactivated */
session->gpsdata.online = (timestamp_t)0;
}