hci: use ERROR_CODE_CONNECTION_REJECTED_DUE_TO_SECURITY_REASONS to rejected classic connections

This commit is contained in:
Matthias Ringwald 2022-06-01 17:33:50 +02:00
parent f88bff64d4
commit d152b6c6cd
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- A2DP: new a2dp.c contains shared code of Sink and Source roles
- A2DP Sink: automatically configure stream endpoint for outgoing connections
- HCI: use ERROR_CODE_CONNECTION_REJECTED_DUE_TO_SECURITY_REASONS to rejected classic connections
- HFP AG: drop unused number parameter from hfp_ag_outgoing_call_initiated
- SM: pairing events indicate if LE Secure Connection will be used

View File

@ -3117,7 +3117,7 @@ static void event_handler(uint8_t *packet, uint16_t size){
if (hci_stack->gap_classic_accept_callback != NULL){
if ((*hci_stack->gap_classic_accept_callback)(addr, link_type) == 0){
hci_stack->decline_reason = ERROR_CODE_CONNECTION_REJECTED_DUE_TO_UNACCEPTABLE_BD_ADDR;
hci_stack->decline_reason = ERROR_CODE_CONNECTION_REJECTED_DUE_TO_SECURITY_REASONS;
bd_addr_copy(hci_stack->decline_addr, addr);
break;
}