diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-05-26 03:31:10 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-05-26 03:31:10 +0000 |
commit | cfa56298e82f1a68f3f1e752fc26724cedd96b6a (patch) | |
tree | 811879f99f6075eb74e5b93de6ac9235d5ea2294 /sirf.c | |
parent | 358bb84f5e6e0c4b31a3085c4690cd7c3e633d2c (diff) | |
download | gpsd-cfa56298e82f1a68f3f1e752fc26724cedd96b6a.tar.gz |
Change API so raw_hook takes a length argument; supports dumping binary packets.
Diffstat (limited to 'sirf.c')
-rw-r--r-- | sirf.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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; |