blob: 7a06795057b5dbdab4217f0c74badfc614274cae [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 6ff099b1ba8de74df9ddeb61e3825264b96ef692 Mon Sep 17 00:00:00 2001
2From: Moritz Fischer <moritz.fischer@ettus.com>
3Date: Tue, 22 Dec 2015 19:38:31 -0800
4Subject: [PATCH] libgpsd-core: Fix issue with ACTIVATE hook not being called.
5
6In the current system session->mode seemed to ignore the
7O_OPTIMIZE flag, leading to the ACTIVATE hook being ignored.
8
9Another way to fix this would be to keep the session->mode
10condition pull up the check for O_CONTINUE.
11
12Upstream-Status: Backported
13This patch is in upstream git
14
15Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
16---
17 libgpsd_core.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/libgpsd_core.c b/libgpsd_core.c
21index 31fec2a..a84e85f 100644
22--- a/libgpsd_core.c
23+++ b/libgpsd_core.c
24@@ -543,7 +543,7 @@ int gpsd_open(struct gps_device_t *session)
25 int gpsd_activate(struct gps_device_t *session, const int mode)
26 /* acquire a connection to the GPS device */
27 {
28- if (session->mode == O_OPTIMIZE)
29+ if (mode == O_OPTIMIZE)
30 gpsd_run_device_hook(&session->context->errout,
31 session->gpsdata.dev.path, "ACTIVATE");
32 session->gpsdata.gps_fd = gpsd_open(session);
33--
342.4.3
35