[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-users] gps_read() returns data with daemon dead
From: |
Antonio FRANCO |
Subject: |
[gpsd-users] gps_read() returns data with daemon dead |
Date: |
Tue, 12 Nov 2013 18:03:57 +0100 |
Hi,
I'm writing a C client able to access to gpsd informations. The version that
I'm using is the 3.9.
Below is the fragment of code that realize the data reading cycle:
--------------
if (gps_waiting(&gpsdata, 10000000)) { // Are there data ?
readData = 0;
readData = gps_read(&gpsdata);
sprintf(buf,"GPSD Read Data: %d",readData);
fcdLog(buf);
if (readData > 0) { // Read data
if(gpsdata.online != 0) { // GPS not online
if(gpsdata.status != STATUS_NO_FIX) { // We have a
fix point
__recordStringValue("FIXED",
"GPSstatus"); // set into DB
--------------
The code works fine with the 'fake' driver up and running.
But, when I break the daemon the client continues to obtain data (?!) in the
sense that the gps_waiting() and the gps_read() functions don't returns the
expected -1 value.
What I made wrong ?
Thanks a lot
Antonio Franco
- [gpsd-users] gps_read() returns data with daemon dead,
Antonio FRANCO <=