mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 07:21:20 +00:00
hci: avoid discard ACL connections on connection complete with error for SCO to same peer
This commit is contained in:
parent
f23819bcb1
commit
3bb5ff27f3
@ -2042,6 +2042,11 @@ static void hci_initializing_event_handler(const uint8_t * packet, uint16_t size
|
||||
}
|
||||
|
||||
static void hci_handle_connection_failed(hci_connection_t * conn, uint8_t status){
|
||||
// CC2564C might emit Connection Complete for rejected incoming SCO connection
|
||||
// To prevent accidentally free'ing the CHI connection for the ACL connection,
|
||||
// check if the hci connection has been outgoing
|
||||
if (conn->state != SENT_CREATE_CONNECTION) return;
|
||||
|
||||
log_info("Outgoing connection to %s failed", bd_addr_to_str(conn->address));
|
||||
bd_addr_t bd_address;
|
||||
(void)memcpy(&bd_address, conn->address, 6);
|
||||
|
Loading…
x
Reference in New Issue
Block a user