diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-24 10:09:50 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-24 10:09:50 +0000 |
commit | 0f1463dfaab8401778107518fbc90b91055dfcb1 (patch) | |
tree | 08b7f953dbfa5723a443661f7bc8c0363c21de5a /gpsdecode.c | |
parent | b01d66215254c314b9798dbd3d01944ec80541ed (diff) | |
download | gpsd-0f1463dfaab8401778107518fbc90b91055dfcb1.tar.gz |
A step twards reporting AIS data in gpsd. All regression tests pass.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r-- | gpsdecode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gpsdecode.c b/gpsdecode.c index 0653df4d..eb7eee44 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -65,8 +65,11 @@ static void decode(FILE *fpin, FILE *fpout) } else if (lexer.type == AIVDM_PACKET) { /*@ -uniondef */ - if (aivdm_decode((char *)lexer.outbuffer, lexer.outbuflen, &aivdm)) - aivdm_dump(&aivdm.decoded, scaled, json, stdout); + if (aivdm_decode((char *)lexer.outbuffer, lexer.outbuflen, &aivdm)){ + aivdm_dump(&aivdm.decoded, scaled, json, buf, sizeof(buf)); + (void)fputs(buf, fpout); + } + /*@ +uniondef */ } } |