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

Commit 3fe303f9 authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge "[Invisalign2] Use btm_find_or_alloc_dev in btm_sec_connect_req" into main

parents 63a51615 76716fb8
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -2060,7 +2060,7 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
 *
 ******************************************************************************/
void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;

  /* Some device may request a connection before we are done with the HCI_Reset
   * sequence */
@@ -2086,10 +2086,7 @@ void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
  btm_sec_cb.connecting_bda = bda;
  memcpy(btm_sec_cb.connecting_dc, dc, DEV_CLASS_LEN);

  if (!p_dev_rec) {
    /* accept the connection -> allocate a device record */
    p_dev_rec = btm_sec_alloc_dev(bda);
  }
  p_dev_rec = btm_find_or_alloc_dev(bda);
  p_dev_rec->sm4 |= BTM_SM4_CONN_PEND;
}