From 6dd560b389a7ed2dbbfcb6485342745ceedbbe91 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 17 Sep 2009 10:16:23 +0000 Subject: Disentangle the packet raw hook used on the client side... ...from the internals of gpsd. Besides being better factoring, this will give us better control of the daemon's report-generation policy in the future. All regression tests pass. Codebase splints clean. --- pseudonmea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pseudonmea.c') diff --git a/pseudonmea.c b/pseudonmea.c index c8c5d070..96b33600 100644 --- a/pseudonmea.c +++ b/pseudonmea.c @@ -174,7 +174,7 @@ static void gpsd_binary_quality_dump(struct gps_device_t *session, char *bufp2 = bufp; bool used_valid = (session->gpsdata.set & USED_SET)!= 0; - if ((session->gpsdata.set & MODE_SET) != 0) { + if (session->device_type!=NULL && (session->gpsdata.set & MODE_SET) != 0) { (void)snprintf(bufp, len-strlen(bufp), "$GPGSA,%c,%d,", 'A', session->gpsdata.fix.mode); j = 0; @@ -226,7 +226,7 @@ static void gpsd_binary_quality_dump(struct gps_device_t *session, #undef ZEROIZE } -void gpsd_binary_dump(struct gps_device_t *session, +void gpsd_pseudonmea_dump(struct gps_device_t *session, char bufp[], size_t len) /* the only entry point - dump a device state in pseudo-NMEA */ { -- cgit v1.2.1