From 9f887aed6cf6904dd88631c2432501b71d2b71de Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 25 Jan 2013 18:10:53 +0200 Subject: [PATCH] core: Add reasoning for ATT connection during paring --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device.c b/src/device.c index 9878b712c..34902b3da 100644 --- a/src/device.c +++ b/src/device.c @@ -1428,6 +1428,11 @@ static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg, device->bonding = bonding; bonding->device = device; + /* Due to a bug in the kernel we might loose out on ATT commands + * that arrive during the SMP procedure, so connect the ATT + * channel first and only then start pairing (there's code for + * this in the ATT connect callback) + */ if (device_is_le(device) && !device_is_connected(device)) err = device_connect_le(device); else -- 2.11.0