mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
hci: assert in gap_request_security_level switch on LE connection
This commit is contained in:
parent
5cf1669fe0
commit
defbf20033
13
src/hci.c
13
src/hci.c
@ -5030,6 +5030,9 @@ void gap_request_security_level(hci_con_handle_t con_handle, gap_security_level_
|
||||
hci_emit_security_level(con_handle, LEVEL_0);
|
||||
return;
|
||||
}
|
||||
|
||||
btstack_assert(hci_is_le_connection(connection) == false);
|
||||
|
||||
gap_security_level_t current_level = gap_security_level(con_handle);
|
||||
log_info("gap_request_security_level requested level %u, planned level %u, current level %u",
|
||||
requested_level, connection->requested_security_level, current_level);
|
||||
@ -5055,21 +5058,11 @@ void gap_request_security_level(hci_con_handle_t con_handle, gap_security_level_
|
||||
// store request
|
||||
connection->requested_security_level = requested_level;
|
||||
|
||||
if (hci_is_le_connection(connection)) {
|
||||
|
||||
// LE Connection - not implemented yet
|
||||
btstack_assert(false);
|
||||
|
||||
} else {
|
||||
|
||||
// Classic Connection
|
||||
|
||||
// start to authenticate connection if authentication not already active
|
||||
if ((connection->bonding_flags & BONDING_SENT_AUTHENTICATE_REQUEST) != 0) return;
|
||||
connection->bonding_flags |= BONDING_SEND_AUTHENTICATE_REQUEST;
|
||||
hci_run();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief start dedicated bonding with device. disconnect after bonding
|
||||
|
Loading…
x
Reference in New Issue
Block a user