Fix : LE connection interval is not updated 35/216135/1
authorinjun.yang <injun.yang@samsung.com>
Mon, 21 Oct 2019 08:50:20 +0000 (17:50 +0900)
committerinjun.yang <injun.yang@samsung.com>
Mon, 21 Oct 2019 08:50:20 +0000 (17:50 +0900)
[Problem] If remote device use LE public address, unable to update LE connection interval
[Cause & Measure] Change the comparison logic to get object
[Checking Method] Connect BLE with LE public address > Repeat interval configuration

Change-Id: I2413e0f0c36918daba91bfb465d549c0e39532a9

src/adapter.c

index 20f2eb1..31ad0e6 100644 (file)
@@ -11986,11 +11986,15 @@ static void le_conn_update_completed_callback(uint16_t index, uint16_t length,
 
        ba2str(&ev->addr.bdaddr, addr);
        if (ev->addr.type == BDADDR_LE_PUBLIC) {
-               /* LE Public or Private Random Address */
+               /* Private Random Address */
                list = g_slist_find_custom(adapter->devices, addr,
                                                device_rpa_ida_cmp);
+               /* LE Public */
+               if (!list)
+                       list = g_slist_find_custom(adapter->devices, addr,
+                                                       device_address_cmp);
        } else if (ev->addr.type == BDADDR_LE_RANDOM) {
-               /* Static Random address */
+               /* LE Static Random address */
                list = g_slist_find_custom(adapter->devices, addr,
                                                        device_address_cmp);
        }