hci: fix handling of HCI Connection Complete with error (regression introduced in v1.5.1)

This commit is contained in:
Matthias Ringwald 2022-02-17 18:12:20 +01:00
parent 9576cd6d6f
commit 1a4fdac4e3
2 changed files with 4 additions and 3 deletions

View File

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- POSIX: fix RTS/CTS configuration by keeping local termios copy in btstack_uart_posix
- HCI: fix handling of HCI Connection Complete with error (regression introduced in v1.5.1)
- GAP: disable scanning, advertising, connection before updating random address
- GAP: fix LE Scan with whitelist
- HFP_AG: fix tracking for call dropped during outgoing ringing

View File

@ -2194,10 +2194,10 @@ 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
// To prevent accidentally free'ing the HCI connection for the ACL connection,
// check if we have been aware of the HCI connection
switch (conn->state){
case SEND_CREATE_CONNECTION:
case SENT_CREATE_CONNECTION:
case RECEIVED_CONNECTION_REQUEST:
break;
default: