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

Commit e5bde22b authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Log when read remote name request callbacks are not sent am: 369ef621 am: 4fe06fb7

parents 74bf4a1b 4fe06fb7
Loading
Loading
Loading
Loading
+22 −7
Original line number Diff line number Diff line
@@ -2330,9 +2330,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(
@@ -2344,11 +2352,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;
  }