gap: fix gap_connect after gap_connect_cancel

This commit is contained in:
Matthias Ringwald 2021-04-26 16:32:03 +02:00
parent a827c5a6d8
commit 1f46817505
2 changed files with 4 additions and 4 deletions

View File

@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- GAP: calculate IO Cap AuthReq Bondable Mode based on `gap_ssp_set_authentication_requirement` and `gap_set_bondable_mode`
- GAP: only store link key for ssp if remote side has set bondable in io cap auth requirements as well
- GAP: allow to disable link supervision timeout
- GAP: fix `gap_connect` after `gap_connect_cancel`
- HFP HF: only emit single event for RING and AG Status updates
- HFP AG: fix audio connection setup for in-band ringtone on incoming connection
- HFP: fix audio connection setup by HF if codec negotiation is supported

View File

@ -2248,10 +2248,9 @@ static void event_handle_le_connection_complete(const uint8_t * packet){
// either an LE Connection Complete or an LE Enhanced Connection Complete event shall be generated.
// In either case, the event shall be sent with the error code Unknown Connection Identifier (0x02)."
if (packet[3] == ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER){
// whitelist connect
if (hci_is_le_connection_type(addr_type)){
hci_stack->le_connecting_state = LE_CONNECTING_IDLE;
}
// reset state
hci_stack->le_connecting_state = LE_CONNECTING_IDLE;
hci_stack->le_connecting_request = LE_CONNECTING_IDLE;
// get outgoing connection conn struct for direct connect
conn = gap_get_outgoing_connection();
}