diff --git a/system/stack/btm/btm_inq.cc b/system/stack/btm/btm_inq.cc index a453c7c7e248071f9649734a01e60b100d7c908d..14ee227ae0f936bbb080cf0404802824dd6fff1c 100644 --- a/system/stack/btm/btm_inq.cc +++ b/system/stack/btm/btm_inq.cc @@ -1107,12 +1107,14 @@ void btm_process_inq_results(const uint8_t* p, uint8_t hci_evt_len, uint16_t clock_offset; const uint8_t* p_eir_data = NULL; -#if (BTM_INQ_DEBUG == TRUE) - BTM_TRACE_DEBUG("btm_process_inq_results inq_active:0x%x state:%d", - btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state); -#endif + LOG_DEBUG("Received inquiry result inq_active:0x%x state:%d", + btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state); + /* Only process the results if the BR inquiry is still active */ - if (!(p_inq->inq_active & BTM_BR_INQ_ACTIVE_MASK)) return; + if (!(p_inq->inq_active & BTM_BR_INQ_ACTIVE_MASK)) { + LOG_INFO("Inquiry is inactive so dropping inquiry result"); + return; + } STREAM_TO_UINT8(num_resp, p); @@ -1256,7 +1258,7 @@ void btm_process_inq_results(const uint8_t* p, uint8_t hci_evt_len, (p_inq_results_cb)((tBTM_INQ_RESULTS*)p_cur, p_eir_data, HCI_EXT_INQ_RESPONSE_LEN); } else { - BTM_TRACE_DEBUG("No callback is registered"); + LOG_WARN("No callback is registered for inquiry result"); } } }