summaryrefslogtreecommitdiff
path: root/gpsdecode.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-07-24 10:09:50 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-07-24 10:09:50 +0000
commit0f1463dfaab8401778107518fbc90b91055dfcb1 (patch)
tree08b7f953dbfa5723a443661f7bc8c0363c21de5a /gpsdecode.c
parentb01d66215254c314b9798dbd3d01944ec80541ed (diff)
downloadgpsd-0f1463dfaab8401778107518fbc90b91055dfcb1.tar.gz
A step twards reporting AIS data in gpsd. All regression tests pass.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r--gpsdecode.c7
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 */
}
}