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

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

stack::sec Re-order name callbacks and sec state updates am: 6b526956 am: 6d8c17a9

parents 798ee28e 6d8c17a9
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2353,14 +2353,15 @@ 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;

  /* Notify all clients waiting for name to be resolved */
  call_registered_rmt_name_callbacks(p_bd_addr, p_dev_rec->dev_class,
                                     p_dev_rec->sec_bd_name, status);

  // Security procedure resumes
  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;

  /* If we were delaying asking UI for a PIN because name was not resolved,
   * ask now */
  if ((btm_sec_cb.pairing_state == BTM_PAIR_STATE_WAIT_LOCAL_PIN) &&