summaryrefslogtreecommitdiff
path: root/driver_nmea2000.c
diff options
context:
space:
mode:
authorReinhard Arlt <reinhard.arlt@t-online.de>2012-07-21 17:13:01 +0200
committerReinhard Arlt <reinhard.arlt@t-online.de>2012-07-21 17:13:01 +0200
commit484428d0a3454e63bf568c4e962371867322fbb5 (patch)
tree938f4ea1de05ad723b2917334d3be51b766d9f09 /driver_nmea2000.c
parent51da3014a4815cc34fe14be1621fa859a4102567 (diff)
downloadgpsd-484428d0a3454e63bf568c4e962371867322fbb5.tar.gz
Own nmea2000_close as gpsd_close is really a serial_close.
Diffstat (limited to 'driver_nmea2000.c')
-rw-r--r--driver_nmea2000.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index aaa40f9e..ca87ca6b 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -807,6 +807,16 @@ int nmea2000_open(struct gps_device_t *session)
}
#endif /* of ifndef S_SPLINT_S */
+void nmea2000_close(struct gps_device_t *session)
+{
+ if (session->gpsdata.gps_fd != -1) {
+ gpsd_report(LOG_SPIN, "close(%d) in nmea2000_close(%s)\n",
+ session->gpsdata.gps_fd, session->gpsdata.dev.path);
+ (void)close(session->gpsdata.gps_fd);
+ session->gpsdata.gps_fd = -1;
+ }
+}
+
/* *INDENT-OFF* */
const struct gps_type_t nmea2000 = {
.type_name = "NMEA2000", /* full name of type */