mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
component/bt: Fixed the bug when remove the bonded device with not exist address will not return error.
This commit is contained in:
@@ -646,8 +646,12 @@ void bta_dm_process_remove_device(BD_ADDR bd_addr)
|
|||||||
if (bta_dm_cb.p_sec_cback) {
|
if (bta_dm_cb.p_sec_cback) {
|
||||||
tBTA_DM_SEC sec_event;
|
tBTA_DM_SEC sec_event;
|
||||||
bdcpy(sec_event.link_down.bd_addr, bd_addr);
|
bdcpy(sec_event.link_down.bd_addr, bd_addr);
|
||||||
/* No connection, set status to success (acl disc code not valid) */
|
if (btm_find_dev(bd_addr) != NULL) {
|
||||||
sec_event.link_down.status = HCI_SUCCESS;
|
/* No connection, set status to success (acl disc code not valid) */
|
||||||
|
sec_event.link_down.status = HCI_SUCCESS;
|
||||||
|
} else {
|
||||||
|
sec_event.link_down.status = HCI_ERR_ILLEGAL_COMMAND;
|
||||||
|
}
|
||||||
bta_dm_cb.p_sec_cback(BTA_DM_DEV_UNPAIRED_EVT, &sec_event);
|
bta_dm_cb.p_sec_cback(BTA_DM_DEV_UNPAIRED_EVT, &sec_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user