OSDN Git Service

core: Add reasoning for ATT connection during paring
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 25 Jan 2013 16:10:53 +0000 (18:10 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 25 Jan 2013 16:10:53 +0000 (18:10 +0200)
src/device.c

index 9878b71..34902b3 100644 (file)
@@ -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