diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2006-10-30 08:12:08 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2006-10-30 08:12:08 +0000 |
commit | a94d50c111df0d6ac9947e12980eddd9a116fde4 (patch) | |
tree | 720cb84a0711edec95fc4b0c27d74e21d3ceb3d5 /libgpsd_core.c | |
parent | 19cc0fdd0d87236ac6afa0a22cb13ceb203da325 (diff) | |
download | gpsd-a94d50c111df0d6ac9947e12980eddd9a116fde4.tar.gz |
More work on gpsctrl.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 05726f9e..cf4a1403 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -644,11 +644,13 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) session->gpsdata.d_decode_time = timestamp(); /* also copy the sentence up to clients in raw mode */ - if (session->packet_type == NMEA_PACKET) - session->gpsdata.raw_hook(&session->gpsdata, - (char *)session->outbuffer, - strlen((char *)session->outbuffer), 1); - else { + if (session->packet_type == NMEA_PACKET) { + if (session->gpsdata.raw_hook) + session->gpsdata.raw_hook(&session->gpsdata, + (char *)session->outbuffer, + strlen((char *)session->outbuffer), + 1); + } else { char buf2[MAX_PACKET_LENGTH*3+2]; buf2[0] = '\0'; |