diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-08-28 13:57:43 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-08-28 13:57:43 +0000 |
commit | dbe646e2b3456c66f77876799fec610e3bbc631f (patch) | |
tree | 605917577c038517177cd26b2d2bea5bc2e7414f /gpsdecode.c | |
parent | 7d2577982a1d8b2ca5b0e77f162ae7ed5b074b51 (diff) | |
download | gpsd-dbe646e2b3456c66f77876799fec610e3bbc631f.tar.gz |
JSON decoding for RTCM2 types 3, 7, and 16 is verified.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r-- | gpsdecode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gpsdecode.c b/gpsdecode.c index 762017f0..63204833 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -96,9 +96,9 @@ static void encode(FILE *fpin, bool repack, FILE *fpout) ++lineno; if (inbuf[0] == '#') continue; - status = gps_unpack(inbuf, &gpsdata); - if (status < 0) { - (void) fprintf(stderr, "gpsdecode: bailing out with status %d on line %d\n", status, lineno); + status = libgps_json_unpack(inbuf, &gpsdata); + if (status != 0) { + (void) fprintf(stderr, "gpsdecode: bailing out with status %d (%s) on line %d\n", status, json_error_string(status), lineno); exit(1); } if ((gpsdata.set & RTCM2_SET) != 0) { if (repack) { |