[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Improve documentation around the usage of gps_close()
From: |
Robert Norris |
Subject: |
[gpsd-dev] [PATCH] Improve documentation around the usage of gps_close() |
Date: |
Sat, 30 Jul 2016 18:08:54 +0000 |
gps_close() should only be called after a successful gps_open()
Also include notes about the returned value and error conditions.
---
libgps.xml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libgps.xml b/libgps.xml
index 8f1dc82..7a6e29c 100644
--- a/libgps.xml
+++ b/libgps.xml
@@ -56,7 +56,7 @@ C:
<paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef>
</funcprototype>
<funcprototype>
-<funcdef>void <function>gps_close</function></funcdef>
+<funcdef>int <function>gps_close</function></funcdef>
<paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef>
</funcprototype>
<funcprototype>
@@ -118,7 +118,11 @@ an IPv4 dotted quad, an IPV6 address, or the special value
shared-memory export; the library will do the right thing for any of
these.</para>
-<para><function>gps_close()</function> ends the session.</para>
+<para><function>gps_close()</function> ends the session and should only be
called after a successful <function>gps_open()</function>.
+It returns 0 on success, -1 on errors.
+The shared-memory interface close always returns 0, whereas a socket close can
result in an error.
+For a socket close error it will have set an errno from the call to the
system's <function>close()</function>.
+</para>
<para><function>gps_send()</function> writes a command to the daemon.
It does nothing when using the shared-memory export.
--
2.8.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-dev] [PATCH] Improve documentation around the usage of gps_close(),
Robert Norris <=