[Top][All Lists]

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

gpsd subscribers.policy.watcher never be set true

From: Zarey Chang
Subject: gpsd subscribers.policy.watcher never be set true
Date: Mon, 13 Jul 2020 10:21:18 +0800


Now, my high level app(GeoClue) connect gpsd with socket by some modification, but it could not received any data but only first version from gpsd.

I find out a thread:
--- a/gpsd.c
+++ b/gpsd.c
@@ -549,6 +549,9 @@ static /address@hidden@*//address@hidden@ */ struct
     for (si = 0; si < NITEMS(subscribers); si++) {
     if (subscribers[si].fd == UNALLOCATED_FD) {
         subscribers[si].fd = 0;    /* mark subscriber as allocated */
+        subscribers[si].policy.watcher = true;
+        subscribers[si].policy.nmea    = true;
+        subscribers[si].policy.json    = false;
         return &subscribers[si];

I found subscriber.policy.watcher and .nmea had never been set to true in gpsd3.19, is it for some reason? Because in function gpsd.c:all_reaports() , only when sub->policy.watcher and sub->policy.nmea are true, the pseudonmea_report was be performed.

So, If it is not a bug, how can I receive data from gpsd? why gpsd still check ub->policy.watcher and sub->policy.nmea?


Zarey C.Y. Chang

reply via email to

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