Fix issue where ACL was not disconnected even though the coc disconnect request was... 78/308578/1
authorWootak Jung <wootak.jung@samsung.com>
Wed, 7 Feb 2024 07:36:27 +0000 (16:36 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 27 Mar 2024 23:26:04 +0000 (08:26 +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 4c94b0cad89e13a670b12261db11d9403cc6f8c6..8e61c7445cf640d48253ee13151af24aae0d9a4c 100644 (file)
@@ -222,7 +222,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 {
@@ -457,7 +456,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);