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_oncore.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_oncore.c')
-rw-r--r-- | driver_oncore.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/driver_oncore.c b/driver_oncore.c index a23b610e..b6b019b7 100644 --- a/driver_oncore.c +++ b/driver_oncore.c @@ -388,10 +388,8 @@ gps_mask_t oncore_dispatch(struct gps_device_t * session, unsigned char *buf, default: /* FIX-ME: This gets noisy in a hurry. Change once your driver works */ - gpsd_report(LOG_WARN, "unknown packet id @@%c%c length %zd: %s\n", - type >> 8, type & 0xff, len, gpsd_hexdump_wrapper(buf, - len, - LOG_WARN)); + gpsd_report(LOG_WARN, "unknown packet id @@%c%c length %zd\n", + type >> 8, type & 0xff, len); return 0; } } @@ -424,10 +422,7 @@ static ssize_t oncore_control_send(struct gps_device_t *session, session->msgbuf[msglen + 4] = '\n'; session->msgbuflen = msglen + 5; - gpsd_report(LOG_IO, "writing oncore control type %c%c:%s\n", - msg[0], msg[1], gpsd_hexdump_wrapper(session->msgbuf, - session->msgbuflen, - LOG_IO)); + gpsd_report(LOG_IO, "writing oncore control type %c%c\n", msg[0], msg[1]); return gpsd_write(session, session->msgbuf, session->msgbuflen); } |