summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-23 13:12:10 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-23 13:12:10 +0000
commit6b070fe325b731a967f8ace8dc2b5d2786676014 (patch)
tree252cf17959eb80572d6088ed7d67f9ce6d647005 /gpsd_json.c
parent894add2589562cf783f444ca7e83943045ffae43 (diff)
downloadgpsd-6b070fe325b731a967f8ace8dc2b5d2786676014.tar.gz
Major rearrangement of device members in struct gpsdata_t...
...documented in the protocol-transition white paper. All regression tests pass.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index b95e8f52..0ed8d0cd 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -30,7 +30,7 @@ void json_tpv_dump(struct gps_data_t *gpsdata, struct gps_fix_t *fixp,
(void)snprintf(reply+strlen(reply),
replylen-strlen(reply),
"\"device\":\"%s\",",
- gpsdata->gps_device);
+ gpsdata->dev.path);
if (isnan(fixp->time)==0)
(void)snprintf(reply+strlen(reply),
replylen-strlen(reply),
@@ -115,7 +115,7 @@ void json_sky_dump(struct gps_data_t *datap, char *reply, size_t replylen)
(void)snprintf(reply+strlen(reply),
replylen-strlen(reply),
"\"device\":\"%s\",",
- datap->gps_device);
+ datap->dev.path);
if (isnan(datap->sentence_time)==0)
(void)snprintf(reply+strlen(reply),
replylen-strlen(reply),
@@ -161,7 +161,7 @@ void json_device_dump(struct gps_device_t *device,
{
struct classmap_t *cmp;
(void)strlcpy(reply, "{\"class\":\"DEVICE\",\"path\":\"", replylen);
- (void)strlcat(reply, device->gpsdata.gps_device, replylen);
+ (void)strlcat(reply, device->gpsdata.dev.path, replylen);
(void)strlcat(reply, "\",", replylen);
(void)snprintf(reply+strlen(reply), replylen-strlen(reply),
"\"activated\":%2.2f,", device->gpsdata.online);
@@ -249,13 +249,13 @@ void json_configdev_dump(struct gps_device_t *devp, char *reply, size_t replylen
{
(void)snprintf(reply, replylen,
"{\"class\":\"CONFIGDEV\",\"device\":\"%s\",\"native\":%d,\"bps\":%d,\"serialmode\":\"%u%c%u\",\"cycle\":%2.2f",
- devp->gpsdata.gps_device,
- devp->gpsdata.driver_mode,
+ devp->gpsdata.dev.path,
+ devp->gpsdata.dev.driver_mode,
(int)gpsd_get_speed(&devp->ttyset),
- 9 - devp->gpsdata.stopbits,
- (int)devp->gpsdata.parity,
- devp->gpsdata.stopbits,
- devp->gpsdata.cycle);
+ 9 - devp->gpsdata.dev.stopbits,
+ (int)devp->gpsdata.dev.parity,
+ devp->gpsdata.dev.stopbits,
+ devp->gpsdata.dev.cycle);
if (devp->device_type->rate_switcher != NULL)
(void)snprintf(reply+strlen(reply), replylen-strlen(reply),
",\"mincycle\":%2.2f",