From 4361ec2d89bdf451602d659ddfd0fb9a79c178a2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 29 Sep 2013 01:42:45 -0400 Subject: Change gpsd_report to no longer use a global. All regression tests pass. This is a large, ugly change. But without it we can't troubleshoot the ICP/IP-source initialization bug properly - colliding definitions of gpsd_report() were interfering with error reporting early in gpsd runs. More cleanup work remains to be done, but at least this is working. --- driver_rtcm3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'driver_rtcm3.c') diff --git a/driver_rtcm3.c b/driver_rtcm3.c index 90fbdae5..f5e6f832 100644 --- a/driver_rtcm3.c +++ b/driver_rtcm3.c @@ -65,7 +65,8 @@ BSD terms apply: see the file COPYING in the distribution root for details. /* *INDENT-OFF* */ /*@ -type @*//* re-enable when we're ready to take this live */ -void rtcm3_unpack( /*@out@*/ struct rtcm3_t *rtcm, char *buf) +void rtcm3_unpack(const int debug, + /*@out@*/ struct rtcm3_t *rtcm, char *buf) /* break out the raw bits into the scaled report-structure fields */ { unsigned int n, n2, n3, n4; @@ -96,7 +97,7 @@ void rtcm3_unpack( /*@out@*/ struct rtcm3_t *rtcm, char *buf) rtcm->length = (uint)ugrab(10); rtcm->type = (uint)ugrab(12); - gpsd_report(LOG_RAW, "RTCM3: type %d payload length %d\n", + gpsd_report(debug, LOG_RAW, "RTCM3: type %d payload length %d\n", rtcm->type, rtcm->length); switch (rtcm->type) { -- cgit v1.2.1