[Top][All Lists]

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

Re: [gpsd-dev] C Client API Issues

From: Robert Norris
Subject: Re: [gpsd-dev] C Client API Issues
Date: Wed, 20 Jul 2016 23:40:36 +0000

From: Hal Murray <address@hidden>
>address@hidden said:
>> gps_close() should only be called after a successful gps_open() (which has =
>> allocated the data).

>> I don't see a way to prevent this solely within gpsd itself, so probably on=
>> ly the documentation should be updated to reflect the recommended usage. 

>gpsd needs a flag so close is a noop if it isn't open.

Wouldn't such a flag would need to go into the gps_data_t structure?
And thus the flag itself would suffer from the same (lack of) initialisation 
Otherwise one could use the gps_fd value being greater than zero as such a flag.

Other C interfaces tend to have an explicit init function which must be called 
before using other functions.


reply via email to

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