Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 369ef621 authored by Chris Manton's avatar Chris Manton
Browse files

Log when read remote name request callbacks are not sent

Bug: 254358644
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: If3353c93bbfdcc1b0a68ffff5e8d4cef37f3c985
parent cec4c33f
Loading
Loading
Loading
Loading
+22 −7
Original line number Diff line number Diff line
@@ -2324,9 +2324,17 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,

    /* Notify all clients waiting for name to be resolved */
    for (i = 0; i < BTM_SEC_MAX_RMT_NAME_CALLBACKS; i++) {
      if (btm_cb.p_rmt_name_callback[i] && p_bd_addr)
      if (btm_cb.p_rmt_name_callback[i]) {
        if (p_bd_addr) {
          (*btm_cb.p_rmt_name_callback[i])(*p_bd_addr, p_dev_rec->dev_class,
                                           p_dev_rec->sec_bd_name);
        } else {
          // TODO Still need to send status back to get SDP state machine
          // running
          LOG_ERROR("Unable to issue callback with unknown address status:%s",
                    hci_status_code_text(status).c_str());
        }
      }
    }
  } else {
    LOG_DEBUG(
@@ -2338,11 +2346,18 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    /* Notify all clients waiting for name to be resolved even if not found so
     * clients can continue */
    for (i = 0; i < BTM_SEC_MAX_RMT_NAME_CALLBACKS; i++) {
      if (btm_cb.p_rmt_name_callback[i] && p_bd_addr)
      if (btm_cb.p_rmt_name_callback[i]) {
        if (p_bd_addr) {
          (*btm_cb.p_rmt_name_callback[i])(*p_bd_addr, (uint8_t*)kDevClassEmpty,
                                           (uint8_t*)kBtmBdNameEmpty);
        } else {
          // TODO Still need to send status back to get SDP state machine
          // running
          LOG_ERROR("Unable to issue callback with unknown address status:%s",
                    hci_status_code_text(status).c_str());
        }
      }
    }

    return;
  }