mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-25 09:02:30 +00:00
hci: fix remove le device from whitelist
This commit is contained in:
parent
762141afa5
commit
334e35ac6f
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- GATT Server: support GATT over Enhanced LE Bearer
|
- GATT Server: support GATT over Enhanced LE Bearer
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- HCI: fix remove le device from whitelist
|
||||||
- HFP: use 'don't care' to accept SCO connections, fixes issue on ESP32
|
- HFP: use 'don't care' to accept SCO connections, fixes issue on ESP32
|
||||||
- HFP: fix LC3-WB init
|
- HFP: fix LC3-WB init
|
||||||
|
|
||||||
|
15
src/hci.c
15
src/hci.c
@ -6354,7 +6354,16 @@ static bool hci_run_general_gap_le(void){
|
|||||||
whitelist_entry_t * entry = (whitelist_entry_t*) btstack_linked_list_iterator_next(&lit);
|
whitelist_entry_t * entry = (whitelist_entry_t*) btstack_linked_list_iterator_next(&lit);
|
||||||
if (entry->state & LE_WHITELIST_REMOVE_FROM_CONTROLLER){
|
if (entry->state & LE_WHITELIST_REMOVE_FROM_CONTROLLER){
|
||||||
entry->state &= ~LE_WHITELIST_REMOVE_FROM_CONTROLLER;
|
entry->state &= ~LE_WHITELIST_REMOVE_FROM_CONTROLLER;
|
||||||
hci_send_cmd(&hci_le_remove_device_from_white_list, entry->address_type, entry->address);
|
entry->state &= ~LE_WHITELIST_ON_CONTROLLER;
|
||||||
|
bd_addr_type_t address_type = entry->address_type;
|
||||||
|
bd_addr_t address;
|
||||||
|
memcpy(address, entry->address, 6);
|
||||||
|
if ((entry->state & LE_WHITELIST_ADD_TO_CONTROLLER) == 0){
|
||||||
|
// remove from whitelist if not scheduled for re-addition
|
||||||
|
btstack_linked_list_remove(&hci_stack->le_whitelist, (btstack_linked_item_t *) entry);
|
||||||
|
btstack_memory_whitelist_entry_free(entry);
|
||||||
|
}
|
||||||
|
hci_send_cmd(&hci_le_remove_device_from_white_list, address_type, address);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (entry->state & LE_WHITELIST_ADD_TO_CONTROLLER){
|
if (entry->state & LE_WHITELIST_ADD_TO_CONTROLLER){
|
||||||
@ -6363,10 +6372,6 @@ static bool hci_run_general_gap_le(void){
|
|||||||
hci_send_cmd(&hci_le_add_device_to_white_list, entry->address_type, entry->address);
|
hci_send_cmd(&hci_le_add_device_to_white_list, entry->address_type, entry->address);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ((entry->state & LE_WHITELIST_ON_CONTROLLER) == 0){
|
|
||||||
btstack_linked_list_remove(&hci_stack->le_whitelist, (btstack_linked_item_t *) entry);
|
|
||||||
btstack_memory_whitelist_entry_free(entry);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user