gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH] Fix problem with devices query to control socket


From: spdawson
Subject: [gpsd-dev] [PATCH] Fix problem with devices query to control socket
Date: Mon, 9 Dec 2013 13:07:21 +0000

From: Simon Dawson <address@hidden>

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 <address@hidden>
---
 gpsd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpsd.c b/gpsd.c
index ade014c..30cd733 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;
-- 
1.8.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]