|
From: | Jon Schlueter |
Subject: | Re: [gpsd-dev] AIS JSON inconsistencies |
Date: | Fri, 2 Oct 2015 07:18:47 -0400 |
Dear all,
I found some inconsistencies in the JSON output. In some cases the line termination is \t\n instead of \r\n.
You can find a patch below.
Best regards,
Stefan Roels
diff --git a/gpsd_json.c b/gpsd_json.c
index 22c9f3d..6641846 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -1902,7 +1902,7 @@ void json_aivdm_dump(const struct ais_t *ais,
break;
case 16: /* IMO236 - Number of persons on board */
str_appendf(buf, buflen,
- "\"persons\":%u}\t\n", ais->type6.dac1fid16.persons);
+ "\"persons\":%u}\r\n", ais->type6.dac1fid16.persons);
break;
case 18: /* IMO289 - Clearance time to enter port */
str_appendf(buf, buflen,
@@ -2296,7 +2296,7 @@ void json_aivdm_dump(const struct ais_t *ais,
break;
case 16: /* IMO289 - Number of persons on board */
str_appendf(buf, buflen,
- "\"persons\":%u}\t\n", ais->type6.dac1fid16.persons);
+ "\"persons\":%u}\r\n", ais->type6.dac1fid16.persons);
break;
case 17: /* IMO289 - VTS-generated/synthetic targets */
(void)strlcat(buf, "\"targets\":[", buflen);
[Prev in Thread] | Current Thread | [Next in Thread] |