diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-09 14:28:19 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-09 14:28:19 +0000 |
commit | 0f175da815138d1ec4d07aed9f18a1a9b0d675bf (patch) | |
tree | c8b9e87684cdb0eb564043e3bf096d72ca5a974c /gpsd.c | |
parent | ca5a6708cae4efecca041775a1afb43cce1c8aef (diff) | |
download | gpsd-0f175da815138d1ec4d07aed9f18a1a9b0d675bf.tar.gz |
Use boolean JSON values where appropriate.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |