summaryrefslogtreecommitdiff
path: root/driver_rtcm3.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-29 01:42:45 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-29 01:46:53 -0400
commit4361ec2d89bdf451602d659ddfd0fb9a79c178a2 (patch)
treeaf067d1d7614a9e67f449eec933ba3347cde10b0 /driver_rtcm3.c
parenta77b95b57475c2856707e91b197f8aaa8e5eb407 (diff)
downloadgpsd-4361ec2d89bdf451602d659ddfd0fb9a79c178a2.tar.gz
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.
Diffstat (limited to 'driver_rtcm3.c')
-rw-r--r--driver_rtcm3.c5
1 files changed, 3 insertions, 2 deletions
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) {