mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(ble/bluedroid): Fixed issue with deleting link key when classic Bluetooth is not used
This commit is contained in:
@ -187,8 +187,10 @@ BOOLEAN BTM_SecDeleteDevice (BD_ADDR bd_addr, tBT_TRANSPORT transport)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((p_dev_rec = btm_find_dev(bd_addr)) != NULL) {
|
if ((p_dev_rec = btm_find_dev(bd_addr)) != NULL) {
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
/* Tell controller to get rid of the link key, if it has one stored */
|
/* Tell controller to get rid of the link key, if it has one stored */
|
||||||
BTM_DeleteStoredLinkKey (p_dev_rec->bd_addr, NULL);
|
BTM_DeleteStoredLinkKey (p_dev_rec->bd_addr, NULL);
|
||||||
|
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
|
|
||||||
btm_sec_free_dev(p_dev_rec, transport);
|
btm_sec_free_dev(p_dev_rec, transport);
|
||||||
}
|
}
|
||||||
|
@ -1149,6 +1149,7 @@ tBTM_STATUS BTM_EnableTestMode(void)
|
|||||||
}
|
}
|
||||||
#endif // #if (BLE_HOST_ENABLE_TEST_MODE_EN == TRUE)
|
#endif // #if (BLE_HOST_ENABLE_TEST_MODE_EN == TRUE)
|
||||||
|
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
** Function BTM_DeleteStoredLinkKey
|
** Function BTM_DeleteStoredLinkKey
|
||||||
@ -1223,6 +1224,7 @@ void btm_delete_stored_link_key_complete (UINT8 *p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
** Function btm_report_device_status
|
** Function btm_report_device_status
|
||||||
|
@ -1001,12 +1001,12 @@ tBTM_STATUS btm_sec_bond_by_transport (BD_ADDR bd_addr, tBT_TRANSPORT transport,
|
|||||||
return (BTM_SUCCESS);
|
return (BTM_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
/* Tell controller to get rid of the link key if it has one stored */
|
/* Tell controller to get rid of the link key if it has one stored */
|
||||||
if ((BTM_DeleteStoredLinkKey (bd_addr, NULL)) != BTM_SUCCESS) {
|
if ((BTM_DeleteStoredLinkKey (bd_addr, NULL)) != BTM_SUCCESS) {
|
||||||
return (BTM_NO_RESOURCES);
|
return (BTM_NO_RESOURCES);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
|
||||||
/* Save the PIN code if we got a valid one */
|
/* Save the PIN code if we got a valid one */
|
||||||
if (p_pin && (pin_len <= PIN_CODE_LEN) && (pin_len != 0)) {
|
if (p_pin && (pin_len <= PIN_CODE_LEN) && (pin_len != 0)) {
|
||||||
btm_cb.pin_code_len = pin_len;
|
btm_cb.pin_code_len = pin_len;
|
||||||
|
Reference in New Issue
Block a user