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

Commit 316109bf authored by Chris Manton's avatar Chris Manton
Browse files

Remove tBTM_CB::discing can never be true

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones

Change-Id: I9ab220375763f1bf8959ace85ef1fc02eca81bd5
parent 49144727
Loading
Loading
Loading
Loading
+13 −21
Original line number Diff line number Diff line
@@ -2329,13 +2329,6 @@ void btm_acl_reset_paging(void) {
void btm_acl_paging(BT_HDR* p, const RawAddress& bda) {
  tBTM_SEC_DEV_REC* p_dev_rec;

  VLOG(2) << __func__ << ":" << btm_cb.discing << " , paging:" << btm_cb.paging
          << " BDA: " << bda;

  if (btm_cb.discing) {
    btm_cb.paging = true;
    fixed_queue_enqueue(btm_cb.page_queue, p);
  } else {
  if (!BTM_IsAclConnectionUp(bda, BT_TRANSPORT_BR_EDR)) {
    VLOG(1) << "connecting_bda: " << btm_cb.connecting_bda;
    if (btm_cb.paging && bda == btm_cb.connecting_bda) {
@@ -2354,7 +2347,6 @@ void btm_acl_paging(BT_HDR* p, const RawAddress& bda) {
    btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
  }
}
}

/*******************************************************************************
 *
+0 −1
Original line number Diff line number Diff line
@@ -260,7 +260,6 @@ typedef struct {
  bool is_inquiry;    /* true, if inquiry is in progess */
  fixed_queue_t* page_queue;
  bool paging;
  bool discing;
  fixed_queue_t* sec_pending_q; /* pending sequrity requests in
                                   tBTM_SEC_QUEUE_ENTRY format */

+0 −3
Original line number Diff line number Diff line
@@ -3706,9 +3706,6 @@ void btm_sec_disconnected(uint16_t handle, uint8_t reason) {
  tBTM_SEC_CALLBACK* p_callback = NULL;
  tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;

  /* If page was delayed for disc complete, can do it now */
  btm_cb.discing = false;

  btm_acl_resubmit_page();

  if (!p_dev_rec) return;