mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 16:20:24 +00:00
att_db: track sc flag
This commit is contained in:
parent
3224a7f690
commit
13eb7322ff
@ -69,6 +69,7 @@ typedef struct att_connection {
|
||||
uint8_t encryption_key_size;
|
||||
uint8_t authenticated;
|
||||
uint8_t authorized;
|
||||
uint8_t secure_connection;
|
||||
} att_connection_t;
|
||||
|
||||
// ATT Client Read Callback for Dynamic Data
|
||||
|
@ -242,6 +242,9 @@ static void att_event_packet_handler (uint8_t packet_type, uint16_t channel, uin
|
||||
if (!att_server) break;
|
||||
att_server->connection.encryption_key_size = gap_encryption_key_size(con_handle);
|
||||
att_server->connection.authenticated = gap_authenticated(con_handle);
|
||||
att_server->connection.secure_connection = gap_secure_connection(con_handle);
|
||||
log_info("encrypted key size %u, authenticated %u, secure connectipon %u",
|
||||
att_server->connection.encryption_key_size, att_server->connection.authenticated, att_server->connection.secure_connection);
|
||||
if (hci_event_packet_get_type(packet) == HCI_EVENT_ENCRYPTION_CHANGE){
|
||||
// restore CCC values when encrypted
|
||||
if (hci_event_encryption_change_get_encryption_enabled(packet)){
|
||||
@ -1020,4 +1023,4 @@ uint16_t att_server_get_mtu(hci_con_handle_t con_handle){
|
||||
att_server_t * att_server = att_server_for_handle(con_handle);
|
||||
if (!att_server) return 0;
|
||||
return att_server->connection.mtu;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user