[Top][All Lists]

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

[gpsd-dev] [PATCH] libgpsd-core: Fix issue with ACTIVATE hook not being

From: Moritz Fischer
Subject: [gpsd-dev] [PATCH] libgpsd-core: Fix issue with ACTIVATE hook not being called.
Date: Tue, 22 Dec 2015 19:42:01 -0800

In the current system session->mode seemed to ignore the
O_OPTIMIZE flag, leading to the ACTIVATE hook being ignored.

Another way to fix this would be to keep the session->mode
condition pull up the check for O_CONTINUE.

Signed-off-by: Moritz Fischer <address@hidden>
 libgpsd_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgpsd_core.c b/libgpsd_core.c
index 31fec2a..a84e85f 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -543,7 +543,7 @@ int gpsd_open(struct gps_device_t *session)
 int gpsd_activate(struct gps_device_t *session, const int mode)
 /* acquire a connection to the GPS device */
-    if (session->mode == O_OPTIMIZE)
+    if (mode == O_OPTIMIZE)
                             session->, "ACTIVATE");
     session->gpsdata.gps_fd = gpsd_open(session);

reply via email to

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