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

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

stack::sec When bonding only save if RNR state active am: 12e75ae6

parents 277731bb 12e75ae6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2314,8 +2314,9 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
                                     p_dev_rec->sec_bd_name, status);

  // Security procedure resumes
  tSECURITY_STATE old_sec_state = p_dev_rec->sec_rec.sec_state;
  if (p_dev_rec->sec_rec.sec_state == tSECURITY_STATE::BTM_SEC_STATE_GETTING_NAME) {
  const bool is_security_state_getting_name =
          (p_dev_rec->sec_rec.sec_state == tSECURITY_STATE::BTM_SEC_STATE_GETTING_NAME);
  if (is_security_state_getting_name) {
    p_dev_rec->sec_rec.sec_state = tSECURITY_STATE::BTM_SEC_STATE_IDLE;
  }

@@ -2439,7 +2440,8 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    return;
  }

  if (old_sec_state != tSECURITY_STATE::BTM_SEC_STATE_GETTING_NAME) {
  if (!is_security_state_getting_name) {
    log::warn("Security manager received RNR event when not in expected state");
    return;
  }