mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-26 11:37:10 +00:00
hci: handle encryption change with error -> trigger emit security level_0 (classic only)
This commit is contained in:
parent
617c03d6ea
commit
8eae094c26
18
src/hci.c
18
src/hci.c
@ -3949,14 +3949,18 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
||||
conn->authentication_flags &= ~AUTH_FLAG_CONNECTION_ENCRYPTED;
|
||||
}
|
||||
} else {
|
||||
uint8_t status = hci_event_encryption_change_get_status(packet);
|
||||
if ((conn->bonding_flags & BONDING_DEDICATED) != 0){
|
||||
conn->bonding_flags &= ~BONDING_DEDICATED;
|
||||
conn->bonding_flags |= BONDING_DISCONNECT_DEDICATED_DONE;
|
||||
conn->bonding_status = status;
|
||||
#ifdef ENABLE_CLASSIC
|
||||
if (!hci_is_le_connection(conn)){
|
||||
uint8_t status = hci_event_encryption_change_get_status(packet);
|
||||
if ((conn->bonding_flags & BONDING_DEDICATED) != 0){
|
||||
conn->bonding_flags &= ~BONDING_DEDICATED;
|
||||
conn->bonding_flags |= BONDING_DISCONNECT_DEDICATED_DONE;
|
||||
conn->bonding_status = status;
|
||||
}
|
||||
// trigger security update -> level 0
|
||||
hci_handle_mutual_authentication_completed(conn);
|
||||
}
|
||||
// trigger security update -> level 0
|
||||
hci_handle_mutual_authentication_completed(conn);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user