summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-07-09 14:28:19 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-07-09 14:28:19 +0000
commit0f175da815138d1ec4d07aed9f18a1a9b0d675bf (patch)
treec8b9e87684cdb0eb564043e3bf096d72ca5a974c /gpsd.c
parentca5a6708cae4efecca041775a1afb43cce1c8aef (diff)
downloadgpsd-0f175da815138d1ec4d07aed9f18a1a9b0d675bf.tar.gz
Use boolean JSON values where appropriate.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsd.c b/gpsd.c
index a7821c33..b8c5e8bf 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1433,11 +1433,11 @@ static int handle_gpsd_request(struct subscriber_t* sub, char *buf, int buflen)
if (sub->device->gpsdata.PRN[i]) {
(void)snprintf(reply+strlen(reply),
sizeof(reply)-strlen(reply),
- "{\"PRN\":%d,\"el\":%d,\"az\":%d,\"ss\":%.0f,\"used\":%d},",
+ "{\"PRN\":%d,\"el\":%d,\"az\":%d,\"ss\":%.0f,\"used\":%s},",
sub->device->gpsdata.PRN[i],
sub->device->gpsdata.elevation[i],sub->device->gpsdata.azimuth[i],
sub->device->gpsdata.ss[i],
- used);
+ used ? "true" : "false");
}
}
reply[strlen(reply)-1] = '\0'; /* trim trailing comma */