mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-18 05:42:49 +00:00
hci: fix compile without ENABLE_CLASSIC
This commit is contained in:
parent
22a3debe3f
commit
6bc9fa5e1d
@ -1785,14 +1785,19 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
|
|||||||
|
|
||||||
static void hci_handle_connection_failed(hci_connection_t * conn, uint8_t status){
|
static void hci_handle_connection_failed(hci_connection_t * conn, uint8_t status){
|
||||||
log_info("Outgoing connection to %s failed", bd_addr_to_str(conn->address));
|
log_info("Outgoing connection to %s failed", bd_addr_to_str(conn->address));
|
||||||
int notify_dedicated_bonding_failed = conn->bonding_flags & BONDING_DEDICATED;
|
|
||||||
bd_addr_t bd_address;
|
bd_addr_t bd_address;
|
||||||
memcpy(&bd_address, conn->address, 6);
|
memcpy(&bd_address, conn->address, 6);
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
|
// cache needed data
|
||||||
|
int notify_dedicated_bonding_failed = conn->bonding_flags & BONDING_DEDICATED;
|
||||||
|
#endif
|
||||||
|
|
||||||
// connection failed, remove entry
|
// connection failed, remove entry
|
||||||
btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn);
|
btstack_linked_list_remove(&hci_stack->connections, (btstack_linked_item_t *) conn);
|
||||||
btstack_memory_hci_connection_free( conn );
|
btstack_memory_hci_connection_free( conn );
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
// notify client if dedicated bonding
|
// notify client if dedicated bonding
|
||||||
if (notify_dedicated_bonding_failed){
|
if (notify_dedicated_bonding_failed){
|
||||||
log_info("hci notify_dedicated_bonding_failed");
|
log_info("hci notify_dedicated_bonding_failed");
|
||||||
@ -1803,6 +1808,7 @@ static void hci_handle_connection_failed(hci_connection_t * conn, uint8_t status
|
|||||||
if (status == ERROR_CODE_AUTHENTICATION_FAILURE) {
|
if (status == ERROR_CODE_AUTHENTICATION_FAILURE) {
|
||||||
gap_drop_link_key_for_bd_addr(bd_address);
|
gap_drop_link_key_for_bd_addr(bd_address);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_handler(uint8_t *packet, int size){
|
static void event_handler(uint8_t *packet, int size){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user