From 792547bb294aaf5272d875a5f81341ba0f5ece8f Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 16 Jan 2009 00:11:29 +0200 Subject: Fix bonding with pre-2.1 devices and newer kernels The L2CAP raw connection will return IO_OUT imediately so let the HCI even tracking take care of cleaning up the bonding struct. --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/device.c b/src/device.c index deb63645..68008ead 100644 --- a/src/device.c +++ b/src/device.c @@ -1552,6 +1552,11 @@ static gboolean create_bonding_io_cb(GIOChannel *io, GIOCondition cond, socklen_t len; int sk, dd, ret; + if (!device->bonding->auth_required) { + device->bonding->io_id = 0; + return FALSE; + } + if (!device->bonding || !device->bonding->auth_required) { g_io_channel_close(io); return FALSE; -- cgit