summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-06-21 20:44:29 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-06-21 20:44:29 +0000
commita2b694ddd5c1c305d1b7a185f8f9f6c0a429e4f5 (patch)
treefb77feee6602b9ef6ec7fdac320f23efd07861e6
parent5b6e3d5fb01ef1e62387405eedf328b2d13f7897 (diff)
downloadgpsd-a2b694ddd5c1c305d1b7a185f8f9f6c0a429e4f5.tar.gz
Nailed Rob's raw-mode core dump.
-rw-r--r--TODO2
-rw-r--r--gpsd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/TODO b/TODO
index 4cf9a530..11b6e2be 100644
--- a/TODO
+++ b/TODO
@@ -10,8 +10,6 @@ EPH and EPV reports are zeroed too often in the TSIP code. There is
some bad interaction between the policy code in libgpsd_core.c and the
driver that we haven't figured out.
-Turning on raw mode on the TSIP driver core-dumps the daemon.
-
*** PPS code is flaky
Som code attempting to terminate the PPS-monutoring thread when there
diff --git a/gpsd.c b/gpsd.c
index 1690bd1b..0b9610c8 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -320,7 +320,9 @@ static void raw_hook(struct gps_data_t *ud,
for (cfd = 0; cfd < FD_SETSIZE; cfd++) {
/* copy raw NMEA sentences from GPS to clients in raw mode */
- if (subscribers[cfd].raw == level && ud->gps_device!=NULL && strcmp(ud->gps_device, (subscribers[cfd].device->gpsdata.gps_device))==0)
+ if (subscribers[cfd].raw == level &&
+ subscribers[cfd].device &&
+ strcmp(ud->gps_device, subscribers[cfd].device->gpsdata.gps_device)==0)
(void)throttled_write(cfd, sentence, (ssize_t)len);
}
}