summaryrefslogtreecommitdiff
path: root/ais_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-04-25 18:33:28 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-04-25 18:33:28 -0400
commit4996b3543521e5dad0886e63a2fa2f1cf4d7b76b (patch)
tree4b078b88c06e2738387c940c797c65493ceafc0d /ais_json.c
parent6a555d5536edf081ec5d15bd23172fcacfd75e3a (diff)
downloadgpsd-4996b3543521e5dad0886e63a2fa2f1cf4d7b76b.tar.gz
In AIS, library-side suppport for IMO289 FID 25.
All regresion tests pass. Code splints clean.
Diffstat (limited to 'ais_json.c')
-rw-r--r--ais_json.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ais_json.c b/ais_json.c
index 827f513d..dbec0e30 100644
--- a/ais_json.c
+++ b/ais_json.c
@@ -13,6 +13,7 @@ representations to libgps structures.
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <stddef.h>
#include "gpsd.h"
#ifdef SOCKET_EXPORT_ENABLE
@@ -140,6 +141,10 @@ int json_ais_read(const char *buf,
status = json_read_object(buf, json_ais6_fid16, endptr);
imo = true;
}
+ else if (strstr(buf, "\"fid\":25,") != NULL) {
+ status = json_read_object(buf, json_ais6_fid25, endptr);
+ imo = true;
+ }
else if (strstr(buf, "\"fid\":32,") != NULL || strstr(buf, "\"fid\":14,") != NULL) {
status = json_read_object(buf, json_ais6_fid32, endptr);
imo = true;