summaryrefslogtreecommitdiff
path: root/tsip.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2006-10-30 06:08:54 +0000
committerEric S. Raymond <esr@thyrsus.com>2006-10-30 06:08:54 +0000
commit3fc121eaec120037eff9c156bb82fe37b5307732 (patch)
tree77020f93d7bedbe07d2fb08dcac7964a64d7763c /tsip.c
parent450333d95d179e0455339d7bc5d8c31f9cf0306f (diff)
downloadgpsd-3fc121eaec120037eff9c156bb82fe37b5307732.tar.gz
Fix libgpsd(3) so it's usable when ntpshm_init() has not been called.
While investigating this I discovered that part of a previous cange (moving an ntpshm_put() call out of the NMEA driver) was incorrect and reverted it.
Diffstat (limited to 'tsip.c')
-rw-r--r--tsip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tsip.c b/tsip.c
index 6ca2107f..693f1f58 100644
--- a/tsip.c
+++ b/tsip.c
@@ -192,7 +192,8 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
session->gpsdata.sentence_time = gpstime_to_unix((int)s1, f1) - f2;
#ifdef NTPSHM_ENABLE
- (void)ntpshm_put(session, session->gpsdata.sentence_time + 0.075);
+ if (session->context->enable_ntpshm)
+ (void)ntpshm_put(session,session->gpsdata.sentence_time+0.075);
#endif
mask |= TIME_SET;
}