summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2008-01-12 23:59:13 +0000
committerGary E. Miller <gem@rellim.com>2008-01-12 23:59:13 +0000
commitd27606f6bc3702a8d1089255f8fe2f3b16955ed7 (patch)
tree39141c25d30856a36eb909c91ad22e11aa5eb25f /serial.c
parent0c391ba5c9039f61bf403e62a442f97f632b2507 (diff)
downloadgpsd-d27606f6bc3702a8d1089255f8fe2f3b16955ed7.tar.gz
Prevent spawning more than one ntp/pps thread. This also fixes some process killing problems I have been seeing. Thanks to John Arthur <lists@davey.net.au>.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/serial.c b/serial.c
index d07b7f3a..5e1c7e24 100644
--- a/serial.c
+++ b/serial.c
@@ -333,6 +333,13 @@ void gpsd_assert_sync(struct gps_device_t *session)
* 1pps derived time data to ntpd.
*/
ntpd_link_activate(session);
+
+ gpsd_report(LOG_INF, "ntpd_link_activate: %d\n",
+ (int)session->shmindex >=0 );
+ /* do not start more than one ntp thread */
+ if (!(session->shmindex >=0))
+ ntpd_link_activate(session);
+
#endif /* NTPSHM_ENABLE */
}