From cfa56298e82f1a68f3f1e752fc26724cedd96b6a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 26 May 2005 03:31:10 +0000 Subject: Change API so raw_hook takes a length argument; supports dumping binary packets. --- sirf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sirf.c') diff --git a/sirf.c b/sirf.c index 9aceca89..c434d3c2 100644 --- a/sirf.c +++ b/sirf.c @@ -139,13 +139,10 @@ int sirf_parse(struct gps_device_t *session, unsigned char *buf, int len) if (len < 0) return 0; - buf2[0] = '='; - buf2[1] = '\0'; + buf2[0] = '\0'; for (i = 0; i < len; i++) sprintf(buf2+strlen(buf2), "%02x", buf[i]); strcat(buf2, "\n"); - if (session->gpsdata.raw_hook) - session->gpsdata.raw_hook(&session->gpsdata, buf2, 2); gpsd_report(5, "Raw SiRF packet type 0x%02x length %d: %s\n", buf[0],len,buf2); buf += 4; len -= 8; -- cgit v1.2.1