Fix issue where ACL was not disconnected even though the coc disconnect request was... 55/305755/1 accepted/tizen/unified/20240216.161315 accepted/tizen/unified/toolchain/20240311.065309 accepted/tizen/unified/x/20240220.145928
authorWootak Jung <wootak.jung@samsung.com>
Wed, 7 Feb 2024 07:36:27 +0000 (16:36 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 7 Feb 2024 07:36:27 +0000 (16:36 +0900)
Modified to shutdown before fd close

Change-Id: I3ac11f324012d2a3e6292f434e58c4f66f48b552
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-api/bt-l2cap-le-client.c

index ede17235c47de90057dc823d51f6a230c1e02953..65925dbc7b5e1a77ebf73daab8ab72f84c42bdaa 100644 (file)
@@ -199,7 +199,6 @@ fail:
        conn_info = __find_l2cap_le_conn_info_with_fd(fd);
        if (conn_info) {
                BT_INFO("Disconnecting client, fd %d", fd);
-               close(conn_info->sock_fd);
                __bt_l2cap_le_client_disconnected(conn_info);
                __l2cap_le_remove_client_conn_info_t(conn_info);
        } else {
@@ -463,7 +462,6 @@ BT_EXPORT_API int bluetooth_l2cap_le_disconnect(int socket_fd)
                return BLUETOOTH_ERROR_NOT_CONNECTED;
        }
 
-       close(conn_info->sock_fd);
        __bt_l2cap_le_client_disconnected(conn_info);
        __l2cap_le_remove_client_conn_info_t(conn_info);