* Parameters: void
*
******************************************************************************/
-void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec, uint8_t res,
- bool is_le_transport) {
- tBTM_SEC_CALLBACK* p_callback = p_dev_rec->p_callback;
-
- BTM_TRACE_DEBUG("%s: p_callback=%p, is_le_transport=%d, res=%d, p_dev_rec=%p",
- __func__, p_dev_rec->p_callback, is_le_transport, res,
- p_dev_rec);
-
- if (p_dev_rec->p_callback) {
- p_dev_rec->p_callback = NULL;
+void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec,
+ tBTM_STATUS btm_status, bool is_le_transport) {
+ ASSERT(p_dev_rec != nullptr);
+ LOG_DEBUG("transport=%s, btm_status=%s", is_le_transport ? "le" : "classic",
+ btm_status_text(btm_status).c_str());
+ tBTM_SEC_CALLBACK* p_callback = p_dev_rec->p_callback;
+ p_dev_rec->p_callback = NULL;
+ if (p_callback != nullptr) {
if (is_le_transport)
(*p_callback)(&p_dev_rec->ble.pseudo_addr, BT_TRANSPORT_LE,
- p_dev_rec->p_ref_data, res);
+ p_dev_rec->p_ref_data, btm_status);
else
(*p_callback)(&p_dev_rec->bd_addr, BT_TRANSPORT_BR_EDR,
- p_dev_rec->p_ref_data, res);
+ p_dev_rec->p_ref_data, btm_status);
}
btm_sec_check_pending_reqs();