summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-10-29 16:52:46 -0700
committerGary E. Miller <gem@rellim.com>2018-10-29 16:52:46 -0700
commit751201571b0a152f9727a70ca349a2290f0b9e3d (patch)
tree8975f7f0e5a56ce2ae27d56747f5c58476d4d33c /gpsd_json.c
parentf4a541357a7b9df4168a4c8f931ffddf7a525f44 (diff)
downloadgpsd-751201571b0a152f9727a70ca349a2290f0b9e3d.tar.gz
rawdata_t: Split mtime into time and nsec.
And have to use t_real for mtime bacause json.c has no t_long type.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 5f4f531c..cc25b6da 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -731,7 +731,8 @@ 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.%09ld,",
+ str_appendf(reply, replylen,
+ "\"device\":\"%s\",\"time\":%ld,\"nsec\":%9ld,",
gpsdata->dev.path, (long)gpsdata->raw.mtime.tv_sec,
gpsdata->raw.mtime.tv_nsec);