From ed3ff0627f8d60f54c2afd602bb8b68a8e1ca02b Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Sat, 18 Feb 2017 17:12:29 +0100 Subject: [PATCH] src/gattlib_connect: Prevent Glib warning Fix warning as explained in this thread: http://www.spinics.net/lists/linux-bluetooth/msg67617.html --- src/gattlib_connect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gattlib_connect.c b/src/gattlib_connect.c index 5b66679..eb8be5a 100644 --- a/src/gattlib_connect.c +++ b/src/gattlib_connect.c @@ -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);