mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
hci: track connection mode
This commit is contained in:
parent
51fd61e9d5
commit
3dce61284e
@ -1821,7 +1821,7 @@ static void event_handler(uint8_t *packet, int size){
|
||||
|
||||
// assert packet is complete
|
||||
if (size != event_length + 2){
|
||||
log_error("hci.c: event_handler called with event packet of wrong size %d, expected %u => dropping packet", size, event_length + 2);
|
||||
log_error("event_handler called with packet of wrong size %d, expected %u => dropping packet", size, event_length + 2);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2188,6 +2188,13 @@ static void event_handler(uint8_t *packet, int size){
|
||||
if (!hci_stack->ssp_auto_accept) break;
|
||||
hci_add_connection_flags_for_flipped_bd_addr(&packet[2], SEND_USER_PASSKEY_REPLY);
|
||||
break;
|
||||
case HCI_EVENT_MODE_CHANGE:
|
||||
handle = hci_event_mode_change_get_handle(packet);
|
||||
conn = hci_connection_for_handle(handle);
|
||||
if (!conn) break;
|
||||
conn->connection_mode = hci_event_mode_change_get_mode(packet);
|
||||
log_info("HCI_EVENT_MODE_CHANGE, handle 0x%04x, mode %u", handle, conn->connection_mode);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case HCI_EVENT_ENCRYPTION_CHANGE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user