Add busy return logic when connecting timer is existing 25/241025/2
authorWootak Jung <wootak.jung@samsung.com>
Fri, 14 Aug 2020 05:04:29 +0000 (14:04 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 14 Aug 2020 05:04:29 +0000 (14:04 +0900)
Change-Id: I0c27ef5e18688220793fa0549380ebb9623bc3b0
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-oal/bluez_hal/src/bt-hal-gatt-client.c

index af10eb2..2ce0c67 100644 (file)
@@ -469,6 +469,10 @@ bt_status_t btif_gattc_client_connect(int client_if, const bt_bdaddr_t *bd_addr,
        ret = _bt_hold_current_advertising();
        if (ret == BT_STATUS_SUCCESS) {
                DBG("Current advertising is held");
+               if (pending_le_conn_timer_id > 0) {
+                       DBG("Connecting timer is existing. return busy");
+                       return BT_STATUS_BUSY;
+               }
                pending_le_conn_info = g_malloc0(sizeof(bt_pending_le_conn_info_s));
                pending_le_conn_info->client_if = client_if;
                memcpy(pending_le_conn_info->bd_addr.address, bd_addr->address,