diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-17 10:16:23 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-17 10:16:23 +0000 |
commit | 6dd560b389a7ed2dbbfcb6485342745ceedbbe91 (patch) | |
tree | 642527bb30bf0507434f018fcc0f0c8a1654a53b /pseudonmea.c | |
parent | 9cdbb998794f19a64b5597002cbf8ade0938357a (diff) | |
download | gpsd-6dd560b389a7ed2dbbfcb6485342745ceedbbe91.tar.gz |
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.
Diffstat (limited to 'pseudonmea.c')
-rw-r--r-- | pseudonmea.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ { |