summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorSimon Dawson <spdawson@gmail.com>2013-12-09 13:07:21 +0000
committerEric S. Raymond <esr@thyrsus.com>2014-01-03 05:00:04 -0500
commit2b1442e865f1403a165966cd2f9b70bbbd2272fa (patch)
tree41f068b4471728335c13e1fe8536b4986f9d928a /gpsd.c
parentd6449386f9944dc8f9a72a031b309df2229ea0d5 (diff)
downloadgpsd-2b1442e865f1403a165966cd2f9b70bbbd2272fa.tar.gz
Fix problem with devices query to control socket
The control socket should support a "?devices" string sent to the control socket. Unfortunately, this appears to be broken; so fix it. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index ade014c9..30cd733e 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -897,7 +897,7 @@ static void handle_control(int sfd, char *buf)
ignore_return(write(sfd, "ERROR\n", 6));
}
}
- } else if (strcmp(buf, "?devices")==0) {
+ } else if (strstr(buf, "?devices")==buf) {
/* write back devices list followed by OK */
for (devp = devices; devp < devices + MAXDEVICES; devp++) {
char *path = devp->gpsdata.dev.path;