summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-17 06:50:34 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-17 06:50:34 -0500
commitcde31a4b148190e6a3cba4d1ede5bcc283dbc684 (patch)
tree6911440f5ab242ee8d3b93721a8df82f7df76428
parentb5bb030d74d3546f86877d674ad439947fcd7640 (diff)
downloadgpsd-cde31a4b148190e6a3cba4d1ede5bcc283dbc684.tar.gz
Don't talk to NTP when we're running inside the test harness
All regression tests pass.
-rw-r--r--ntpshm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ntpshm.c b/ntpshm.c
index 6d7bf2dd..4906d2e6 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -448,6 +448,10 @@ void ntpshm_link_deactivate(struct gps_device_t *session)
void ntpshm_link_activate(struct gps_device_t *session)
/* set up ntpshm storage for a session */
{
+ /* don't talk to NTP when we're running inside the test harness */
+ if (session->sourcetype == source_pty)
+ return;
+
/* allocate a shared-memory segment for "NMEA" time data */
session->shm_clock = ntpshm_alloc(session->context);