summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-11-08 15:44:50 -0800
committerGary E. Miller <gem@rellim.com>2018-11-08 15:44:50 -0800
commit92a019f96c4cf836c5a9c99c4b305a8c29f9bf6b (patch)
treeb124adc9456157e1505009bba20ba00004e0df5f /gpsd_json.c
parent406c477f3fc7283432bcf6522dd8d6555c7b7c1d (diff)
downloadgpsd-92a019f96c4cf836c5a9c99c4b305a8c29f9bf6b.tar.gz
gpsd_json: RAW: Always report time.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 4840c389..22fb6f32 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -735,12 +735,12 @@ void json_raw_dump(const struct gps_data_t *gpsdata,
}
(void)strlcpy(reply, "{\"class\":\"RAW\",", replylen);
if (gpsdata->dev.path[0] != '\0')
- str_appendf(reply, replylen,
- "\"device\":\"%s\",\"time\":%ld,\"nsec\":%9ld,",
- gpsdata->dev.path, (long)gpsdata->raw.mtime.tv_sec,
- gpsdata->raw.mtime.tv_nsec);
+ str_appendf(reply, replylen, "\"device\":\"%s\",", gpsdata->dev.path);
+
+ str_appendf(reply, "\"time\":%ld,\"nsec\":%9ld,\"rawdata\":[",
+ replylen, (long)gpsdata->raw.mtime.tv_sec,
+ gpsdata->raw.mtime.tv_nsec);
- (void)strlcat(reply, "\"rawdata\":[", replylen);
for (i = 0; i < MAXCHANNELS; i++) {
bool comma = false;
if (0 == gpsdata->raw.meas[i].svid) {