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_proto.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_proto.c')
-rw-r--r-- | driver_proto.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/driver_proto.c b/driver_proto.c index 85075560..8d13b578 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -300,9 +300,7 @@ gps_mask_t _proto__dispatch(struct gps_device_t *session, unsigned char *buf, si /* Deliver message to specific decoder based on message type */ default: - /* This gets noisy in a hurry. Change once your driver works */ - gpsd_report(LOG_WARN, "unknown packet id %d length %d: %s\n", - type, len, gpsd_hexdump_wrapper(buf, len, LOG_WARN)); + gpsd_report(LOG_WARN, "unknown packet id %d length %d\n", type, len); return 0; } } @@ -352,8 +350,7 @@ static ssize_t _proto__control_send(struct gps_device_t *session, /* we may need to dump the message */ return gpsd_write(session, session->msgbuf, session->msgbuflen); - gpsd_report(LOG_IO, "writing _proto_ control type %02x:%s\n", - msg[0], gpsd_hexdump_wrapper(session->msgbuf, session->msgbuflen, LOG_IO)); + gpsd_report(LOG_IO, "writing _proto_ control type %02x\n"); return gpsd_write(session, session->msgbuf, session->msgbuflen); } /*@ -charint +usedef +compdef @*/ |