summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-04-25 12:53:02 -0700
committerGary E. Miller <gem@rellim.com>2016-04-25 12:53:02 -0700
commit7329c9234fe2a8c2e0452e1995bb6aae6178cc6f (patch)
tree0544ac74057b03770ada5ad5c43bc118c477d1a6 /gpsctl.c
parent90bb66fcb357e7108881c60e41ac07fc7ad03116 (diff)
downloadgpsd-7329c9234fe2a8c2e0452e1995bb6aae6178cc6f.tar.gz
Change JSON line ending \n to \r\n.
Seems to make gpsctl work better.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsctl.c b/gpsctl.c
index 4617e163..e3835bda 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -366,7 +366,7 @@ int main(int argc, char **argv)
timeout = HIGH_LEVEL_TIMEOUT;
/* what devices have we available? */
- if (!gps_query(&gpsdata, DEVICELIST_SET, (int)timeout, "?DEVICES;\n")) {
+ if (!gps_query(&gpsdata, DEVICELIST_SET, (int)timeout, "?DEVICES;\r\n")) {
gpsd_log(&context.errout, LOG_ERROR, "no DEVICES response received.\n");
(void)gps_close(&gpsdata);
exit(EXIT_FAILURE);
@@ -550,7 +550,7 @@ int main(int argc, char **argv)
if (rate != NULL) {
(void)gps_query(&gpsdata,
DEVICE_SET, (int)timeout,
- "?DEVICE={\"path\":\"%s\",\"cycle\":%s}\n",
+ "?DEVICE={\"path\":\"%s\",\"cycle\":%s}\r\n",
device, rate);
}
#endif /* RECONFIGURE_ENABLE */