From 57a9eeaef5ca0cbb86be501510b26390a3674670 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 9 Dec 2019 11:39:22 +0100 Subject: [PATCH] l2cap: fix creation of multiple outgoing l2cap channels (pull request #205) --- src/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/l2cap.c b/src/l2cap.c index e0664de3f..361120a87 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -1978,7 +1978,7 @@ uint8_t l2cap_create_channel(btstack_packet_handler_t channel_packet_handler, bd // check if hci connection is already usable hci_connection_t * conn = hci_connection_for_bd_addr_and_type(address, BD_ADDR_TYPE_ACL); - if (conn){ + if (conn && conn->con_handle != HCI_CON_HANDLE_INVALID){ log_info("l2cap_create_channel, hci connection 0x%04x already exists", conn->con_handle); l2cap_handle_connection_complete(conn->con_handle, channel); // check if remote supported fearures are already received