diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-06-17 02:23:58 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-06-17 02:23:58 -0400 |
commit | 0d3f1eb114c9733519a25f8881b85cb81a7d37a0 (patch) | |
tree | ca41b5e9e9ca78637795fbfa5d27b0991dde588d /driver_garmin_txt.c | |
parent | 730b2feea3b2da3d046b25b119375682dea5e179 (diff) | |
download | gpsd-0d3f1eb114c9733519a25f8881b85cb81a7d37a0.tar.gz |
Cut down on gpsd_hexdump_wrapper() calls.
This awkward construct seems to have triggered some sort of toolchain
bug. The symptom is that gpsd_hexdump_level has different values depending
on whether we test it inside or outside of hex.c.
As a first step towards eliminating this global, we throw out a bunch
of hex logging that is duplicative or not really needed for production
drivers. Experimental drivers can call the hex dumper unconditionally.
The goal is to reduce the number of uses of this variable to eliminate it
withoud doing violence to the internal APIs. This is a first step.
All regression tests pass.
Diffstat (limited to 'driver_garmin_txt.c')
-rw-r--r-- | driver_garmin_txt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/driver_garmin_txt.c b/driver_garmin_txt.c index d53dd57e..f2b4a883 100644 --- a/driver_garmin_txt.c +++ b/driver_garmin_txt.c @@ -263,11 +263,8 @@ gps_mask_t garmintxt_parse(struct gps_device_t * session) gps_mask_t mask = 0; - gpsd_report(LOG_PROG, "Garmin Simple Text packet, len %zd\n", - session->packet.outbuflen); - gpsd_report(LOG_RAW, "%s\n", - gpsd_hexdump_wrapper(session->packet.outbuffer, - session->packet.outbuflen, LOG_RAW)); + gpsd_report(LOG_PROG, "Garmin Simple Text packet, len %zd: %s\n", + session->packet.outbuflen, (char*)session->packet.outbuffer); if (session->packet.outbuflen < 54) { /* trailing CR and LF can be ignored; ('@' + 54x 'DATA' + '\r\n') has length 57 */ |