summaryrefslogtreecommitdiff
path: root/ais_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-04-18 21:15:25 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-04-18 21:15:25 -0400
commit1223dda6e36ac123e9b68148ed7a0e12d9c5a439 (patch)
tree51e668de612dd3649f8f68b66673fc479ad7207c /ais_json.c
parentdc951e0111c2d141eb2b33ec8ad50f3a18e9dad0 (diff)
downloadgpsd-1223dda6e36ac123e9b68148ed7a0e12d9c5a439.tar.gz
In AIS, support for message class 8 dac=1 fid=29.
Diffstat (limited to 'ais_json.c')
-rw-r--r--ais_json.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ais_json.c b/ais_json.c
index ad0f5ee0..67126a3d 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -117,7 +117,11 @@ int json_ais_read(const char *buf,
status = json_read_object(buf, json_ais7, endptr);
} else if (strstr(buf, "\"type\":8,") != NULL) {
bool imo = false;
- if (strstr(buf, "\"fid\":31,") != NULL || strstr(buf, "\"fid\":11,") != NULL) {
+ if (strstr(buf, "\"fid\":29,") != NULL) {
+ status = json_read_object(buf, json_ais8_fid29, endptr);
+ imo = true;
+ }
+ else if (strstr(buf, "\"fid\":31,") != NULL || strstr(buf, "\"fid\":11,") != NULL) {
status = json_read_object(buf, json_ais8_fid31, endptr);
imo = true;
}