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

Commit 412ed781 authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge "[Invisalign2] Move one reject connection op out of btm_sec_conn_req" into main

parents 0eb003a9 5c7bceb2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2564,6 +2564,15 @@ void btm_connection_request(const RawAddress& bda,
                            const bluetooth::types::ClassOfDevice& cod) {
  // Copy Cod information
  DEV_CLASS dc;

  /* Some device may request a connection before we are done with the HCI_Reset
   * sequence */
  if (!controller_get_interface()->get_is_ready()) {
    LOG_VERBOSE("Security Manager: connect request when device not ready");
    btsnd_hcic_reject_conn(bda, HCI_ERR_HOST_REJECT_DEVICE);
    return;
  }

  dc[0] = cod.cod[2], dc[1] = cod.cod[1], dc[2] = cod.cod[0];

  btm_sec_conn_req(bda, dc);
+0 −8
Original line number Diff line number Diff line
@@ -2048,14 +2048,6 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc) {
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;

  /* Some device may request a connection before we are done with the HCI_Reset
   * sequence */
  if (!controller_get_interface()->get_is_ready()) {
    LOG_VERBOSE("Security Manager: connect request when device not ready");
    btsnd_hcic_reject_conn(bda, HCI_ERR_HOST_REJECT_DEVICE);
    return;
  }

  if ((btm_sec_cb.pairing_state != BTM_PAIR_STATE_IDLE) &&
      (btm_sec_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD) &&
      (btm_sec_cb.pairing_bda == bda)) {