diff --git a/src/device.c b/src/device.c
index 311dca1..36d07ca 100644
--- a/src/device.c
+++ b/src/device.c
gboolean authorizing;
gint ref;
+
+ GIOChannel *att_io;
};
static uint16_t uuid_list[] = {
if (device->auto_id)
g_source_remove(device->auto_id);
+ if (device->att_io) {
+ g_io_channel_shutdown(device->att_io, FALSE, NULL);
+ g_io_channel_unref(device->att_io);
+ }
+
DBG("%p", device);
g_free(device->authr);
struct btd_device *device = user_data;
GAttrib *attrib;
+ g_io_channel_unref(device->att_io);
+ device->att_io = NULL;
+
if (gerr) {
DBG("%s", gerr->message);
return FALSE;
}
- g_io_channel_unref(io);
+ device->att_io = io;
return FALSE;
}