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

Commit 6ba42076 authored by Henri Chataing's avatar Henri Chataing
Browse files

Remove unused function gatt_num_clcb_by_bd_addr

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I8f61001c7f92be4c9429a94935740168e15dfe0d
parent a8072c15
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -617,7 +617,6 @@ void gatt_sr_update_cback_cnt(tGATT_TCB& p_tcb, uint16_t cid, tGATT_IF gatt_if,
void gatt_sr_update_prep_cnt(tGATT_TCB& tcb, tGATT_IF gatt_if, bool is_inc,
                             bool is_reset_first);

uint8_t gatt_num_clcb_by_bd_addr(const RawAddress& bda);
tGATT_TCB* gatt_find_tcb_by_cid(uint16_t lcid);
tGATT_TCB* gatt_allocate_tcb_by_bdaddr(const RawAddress& bda,
                                       tBT_TRANSPORT transport);
+0 −18
Original line number Diff line number Diff line
@@ -1311,24 +1311,6 @@ tGATT_TCB* gatt_find_tcb_by_cid(uint16_t lcid) {
  return p_tcb;
}

/*******************************************************************************
 *
 * Function         gatt_num_clcb_by_bd_addr
 *
 * Description      The function searches all LCB with macthing bd address
 *
 * Returns          total number of clcb found.
 *
 ******************************************************************************/
uint8_t gatt_num_clcb_by_bd_addr(const RawAddress& bda) {
  uint8_t num = 0;

  for (auto const& clcb : gatt_cb.clcb_queue) {
    if (clcb.p_tcb->peer_bda == bda) num++;
  }
  return num;
}

void gatt_sr_copy_prep_cnt_to_cback_cnt(tGATT_TCB& tcb) {
  for (uint8_t i = 0; i < GATT_MAX_APPS; i++) {
    if (tcb.prep_cnt[i]) {