l2cap: fix creation of multiple outgoing l2cap channels (pull request #205)

This commit is contained in:
Matthias Ringwald 2019-12-09 11:39:22 +01:00
parent 93493c2701
commit 57a9eeaef5

View File

@ -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