src/gattlib_connect: Prevent Glib warning

Fix warning as explained in this thread: http://www.spinics.net/lists/linux-bluetooth/msg67617.html
pull/14/head
Olivier Martin 2017-02-18 17:12:29 +01:00
parent a5d4655922
commit ed3ff0627f
1 changed files with 2 additions and 0 deletions

View File

@ -351,10 +351,12 @@ gatt_connection_t *gattlib_connect(const gchar *src, const gchar *dst,
}
int gattlib_disconnect(gatt_connection_t* connection) {
#if BLUEZ_VERSION_MAJOR == 4
// Stop the I/O Channel
GIOStatus status = g_io_channel_shutdown(connection->io, FALSE, NULL);
assert(status == G_IO_STATUS_NORMAL);
g_io_channel_unref(connection->io);
#endif
g_attrib_unref(connection->attrib);