summaryrefslogtreecommitdiff
path: root/ntpshm.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-02 10:41:07 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-11-02 10:41:07 -0400
commitdae540addfe666a5a296d9be40a283da7dc3d2fe (patch)
treefbe0f8a75c32dd173de604aac33d018b035d2280 /ntpshm.c
parent05416cc2c661d3f4c8b391723051927d524f4688 (diff)
downloadgpsd-dae540addfe666a5a296d9be40a283da7dc3d2fe.tar.gz
Eliminate an enable flag that always gets set true.
All regression tests pass. PPS is live.
Diffstat (limited to 'ntpshm.c')
-rw-r--r--ntpshm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ntpshm.c b/ntpshm.c
index f710a02a..0388a117 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -167,7 +167,6 @@ void ntpshm_context_init(struct gps_context_t *context)
}
}
memset(context->shmTimeInuse, 0, sizeof(context->shmTimeInuse));
- context->enable_ntpshm = true;
}
static int ntpshm_alloc(struct gps_context_t *context)
@@ -482,9 +481,8 @@ 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 */
{
- /* If we are talking to ntpd, allocate a shared-memory segment for "NMEA" time data */
- if (session->context->enable_ntpshm)
- session->shmindex = ntpshm_alloc(session->context);
+ /* allocate a shared-memory segment for "NMEA" time data */
+ session->shmindex = ntpshm_alloc(session->context);
if (0 > session->shmindex) {
gpsd_report(session->context->debug, LOG_INF, "NTPD ntpshm_alloc() failed\n");