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

Commit a27448a8 authored by Chris Manton's avatar Chris Manton
Browse files

stack::sec Move old_sec_state to where it is changed

Bug: 347349670
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I652e1701392a561efbcb1716c802052254effe1a
parent 7e045318
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2328,7 +2328,6 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    return;
  }

  uint8_t old_sec_state = p_dev_rec->sec_rec.sec_state;
  if (status == HCI_SUCCESS) {
    log::debug(
        "Remote read request complete for known device pairing_state:{} "
@@ -2354,6 +2353,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    p_dev_rec->sec_bd_name[0] = 0;
  }

  uint8_t old_sec_state = p_dev_rec->sec_rec.sec_state;
  if (p_dev_rec->sec_rec.sec_state == BTM_SEC_STATE_GETTING_NAME)
    p_dev_rec->sec_rec.sec_state = BTM_SEC_STATE_IDLE;