diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-01-26 06:01:18 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-26 06:01:18 -0500 |
commit | 3a6cf604f7b4a6ce20d4cfd05c5f0b63ff45edb7 (patch) | |
tree | 66a409e7398e9c6bfcae53a05e9fa3d4d9a7fd23 /gpsd.c | |
parent | 7ff2d8c939c9fb6a194b7290edda3508b6172001 (diff) | |
download | gpsd-3a6cf604f7b4a6ce20d4cfd05c5f0b63ff45edb7.tar.gz |
Prevent TIOCMIWAIT from beinf sent to non-serial devices.
All regression tests pass.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -708,15 +708,17 @@ static bool open_device( /*@null@*/struct gps_device_t *device) } #ifdef NTPSHM_ENABLE - /* - * Now is the right time to grab the shared memory segment(s) - * to communicate the navigation message derived and (possibly) - * 1PPS derived time data to ntpd/chrony. - */ - ntpshm_link_activate(device); - gpsd_report(&context.errout, LOG_INF, - "NTPD ntpshm_link_activate: %d\n", - device->shm_clock != NULL); + if (device->sourcetype == source_rs232 || device->sourcetype == source_usb) { + /* + * Now is the right time to grab the shared memory segment(s) + * to communicate the navigation message derived and (possibly) + * 1PPS derived time data to ntpd/chrony. + */ + ntpshm_link_activate(device); + gpsd_report(&context.errout, LOG_INF, + "NTPD ntpshm_link_activate: %d\n", + device->shm_clock != NULL); + } #endif /* NTPSHM_ENABLE */ gpsd_report(&context.errout, LOG_INF, |