mirror of https://github.com/labapart/gattlib
src/gattlib_connect: Prevent Glib warning
Fix warning as explained in this thread: http://www.spinics.net/lists/linux-bluetooth/msg67617.htmlpull/14/head
parent
a5d4655922
commit
ed3ff0627f
|
@ -351,10 +351,12 @@ gatt_connection_t *gattlib_connect(const gchar *src, const gchar *dst,
|
||||||
}
|
}
|
||||||
|
|
||||||
int gattlib_disconnect(gatt_connection_t* connection) {
|
int gattlib_disconnect(gatt_connection_t* connection) {
|
||||||
|
#if BLUEZ_VERSION_MAJOR == 4
|
||||||
// Stop the I/O Channel
|
// Stop the I/O Channel
|
||||||
GIOStatus status = g_io_channel_shutdown(connection->io, FALSE, NULL);
|
GIOStatus status = g_io_channel_shutdown(connection->io, FALSE, NULL);
|
||||||
assert(status == G_IO_STATUS_NORMAL);
|
assert(status == G_IO_STATUS_NORMAL);
|
||||||
g_io_channel_unref(connection->io);
|
g_io_channel_unref(connection->io);
|
||||||
|
#endif
|
||||||
|
|
||||||
g_attrib_unref(connection->attrib);
|
g_attrib_unref(connection->attrib);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue