gpsd-users
[Top][All Lists]
Advanced

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

When and why do flags need to be passed alongside WATCH_DISABLE?


From: bryan coxwell
Subject: When and why do flags need to be passed alongside WATCH_DISABLE?
Date: Mon, 1 Jul 2024 10:44:24 -0400

In the GPSD Client HOWTO it states that “when your application shuts down, it 
can cancel its watch: ‘?WATCH={“enable”: false}’”. It’s my understanding that 
this message corresponds to passing WATCH_DISABLE to ‘gps_stream()’.

I’ve also come across code that passes additional WATCH_* flags alongside 
WATCH_DISABLE. Is this necessary? If so, why? 

Since the function ‘gps_sock_stream()’ in libgps_sock.c does handle additional 
flags when WATCH_DISABLE is present (setting their values to false if they’re 
present) I assume it is necessary, but I still don’t understand why. 

Any help would be greatly appreciated!


reply via email to

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