summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gpsd.c b/gpsd.c
index 8c1e1bf1..f31d07eb 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -223,9 +223,6 @@ static void typelist(void)
#if defined(NTPSHM_ENABLE)
(void)printf("# NTPSHM for NTPd enabled.\n");
#endif
-#if defined(CHRONY_ENABLE)
- (void)printf("# Chrony support enabled.\n");
-#endif
#if defined(PPS_ENABLE)
(void)printf("# PPS enabled.\n");
#endif
@@ -666,9 +663,9 @@ static void deactivate_device(struct gps_device_t *device)
adjust_max_fd(device->gpsdata.gps_fd, false);
#if defined(PPS_ENABLE) && defined(TIOCMIWAIT)
#endif /* defined(PPS_ENABLE) && defined(TIOCMIWAIT) */
-#ifdef TIMESERVICE_ENABLE
+#ifdef NTPSHM_ENABLE
ntpd_link_deactivate(device);
-#endif /* TIMESERVICE_ENABLE */
+#endif /* NTPSHM_ENABLE */
gpsd_deactivate(device);
}
}
@@ -720,7 +717,7 @@ bool gpsd_add_device(const char *device_name, bool flag_nowait)
for (devp = devices; devp < devices + MAXDEVICES; devp++)
if (!allocated_device(devp)) {
gpsd_init(devp, &context, device_name);
-#ifdef TIMESERVICE_ENABLE
+#ifdef NTPSHM_ENABLE
/*
* Now is the right time to grab the shared memory segment(s)
* to communicate the navigation message derived and (possibly)
@@ -735,7 +732,7 @@ bool gpsd_add_device(const char *device_name, bool flag_nowait)
"NTPD ntpd_link_activate: %d\n",
(int)devp->shmindex >= 0);
-#endif /* TIMESERVICE_ENABLE */
+#endif /* NTPSHM_ENABLE */
gpsd_report(context.debug, LOG_INF,
"stashing device %s at slot %d\n",
device_name, (int)(devp - devices));
@@ -1511,7 +1508,7 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed)
}
-#ifdef TIMESERVICE_ENABLE
+#ifdef NTPSHM_ENABLE
/*
* Time is eligible for shipping to NTPD if the driver has
* asserted PPSTIME_IS at any point in the current cycle.
@@ -1539,14 +1536,14 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed)
//gpsd_report(context.debug, LOG_PROG, "NTP: Got one\n");
/* assume zero when there's no offset method */
if (device->device_type == NULL
- || device->device_type->time_offset == NULL)
+ || device->device_type->ntp_offset == NULL)
offset = 0.0;
else
- offset = device->device_type->time_offset(device);
+ offset = device->device_type->ntp_offset(device);
(void)ntpshm_put(device, device->newdata.time, offset);
device->last_fixtime = device->newdata.time;
}
-#endif /* TIMESERVICE_ENABLE */
+#endif /* NTPSHM_ENABLE */
/*
* If no reliable end of cycle, must report every time
@@ -1949,7 +1946,7 @@ int main(int argc, char *argv[])
gpsd_report(context.debug, LOG_INF, "listening on port %s\n", gpsd_service);
#endif /* SOCKET_EXPORT_ENABLE */
-#ifdef TIMESERVICE_ENABLE
+#ifdef NTPSHM_ENABLE
if (getuid() == 0) {
errno = 0;
// nice() can ONLY succeed when run as root!
@@ -1963,7 +1960,7 @@ int main(int argc, char *argv[])
* to use segments 0 and 1.
*/
(void)ntpshm_init(&context);
-#endif /* TIMESERVICE_ENABLE */
+#endif /* NTPSHM_ENABLE */
#if defined(DBUS_EXPORT_ENABLE) && !defined(S_SPLINT_S)
/* we need to connect to dbus as root */