Fix missing response issue of getting bonded device and devices. 58/301958/1
authorHarsh Jain <jain.harsh@samsung.com>
Tue, 28 Nov 2023 11:04:42 +0000 (16:34 +0530)
committerHarsh Jain <jain.harsh@samsung.com>
Tue, 28 Nov 2023 11:04:42 +0000 (16:34 +0530)
Response is missing if the request of getting bonded device and devices is coming
while bonded_list_retrieved not set.

Change-Id: I9defc6ff55e7e173ec542ad021c0f76481a41de6
Signed-off-by: Harsh Jain <jain.harsh@samsung.com>
bt-service/services/device/bt-service-bonded-device.c

index b73c650..136afb8 100644 (file)
@@ -458,6 +458,9 @@ void _bt_device_handle_paired_address_list(bluetooth_device_address_t *addr_list
                BT_DBG("No paired device found");
                bonded_list_index = 0;
                bonded_list_retrieved = TRUE;
+               /* Send reply if request for BT_GET_BONDED_DEVICE and BT_GET_BONDED_DEVICES is pending */
+               __bt_handle_pending_request(BLUETOOTH_ERROR_NONE, BT_GET_BONDED_DEVICE);
+               __bt_handle_pending_request(BLUETOOTH_ERROR_NONE, BT_GET_BONDED_DEVICES);
                return;
        }