summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-01-16 00:11:29 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-01-16 00:11:29 +0200
commit792547bb294aaf5272d875a5f81341ba0f5ece8f (patch)
tree8a8e5662906960980b07d8e6daa50145aa372044 /src
parent91ee7498214310b04b0d70d0016dfd3804dd64ae (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/device.c5
1 files changed, 5 insertions, 0 deletions
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;