gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] AIS JSON inconsistencies


From: Stefan Roels
Subject: [gpsd-dev] AIS JSON inconsistencies
Date: Fri, 02 Oct 2015 09:18:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]