summaryrefslogtreecommitdiff
path: root/ais_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-04-20 07:04:52 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-04-20 07:04:52 -0400
commit9ea5ad58a4051ec2521a2ccd9aac5dc1dd204835 (patch)
treeccec1db51cf7ddb69454416bbe5f9b8499245833 /ais_json.c
parentb92eb2b2d8660e787ee57351a6576eb28c9af755 (diff)
downloadgpsd-9ea5ad58a4051ec2521a2ccd9aac5dc1dd204835.tar.gz
Support IMO236 Dangerous Cargo Indication.
Built with the new code generator, which is also brought up to production capability in this commit.
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 67126a3d..4946e583 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -94,7 +94,11 @@ int json_ais_read(const char *buf,
}
} else if (strstr(buf, "\"type\":6,") != NULL) {
bool imo = false;
- if (strstr(buf, "\"fid\":16,") != NULL) {
+ if (strstr(buf, "\"fid\":12,") != NULL) {
+ status = json_read_object(buf, json_ais6_fid12, endptr);
+ imo = true;
+ }
+ else if (strstr(buf, "\"fid\":16,") != NULL) {
status = json_read_object(buf, json_ais6_fid16, endptr);
imo = true;
}