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

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

Add API tL2C_LCB::number_of_active_dynamic_channels

Toward loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I9a568d60c444c1ec9811f4fd42ac3b371318aad2
parent a22ed59a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -493,6 +493,16 @@ typedef struct t_l2c_linkcb {

  uint16_t pending_lead_cid;
  uint16_t pending_l2cap_result;

  unsigned number_of_active_dynamic_channels() const {
    unsigned cnt = 0;
    const tL2C_CCB* cur = ccb_queue.p_first_ccb;
    while (cur != nullptr) {
      cnt++;
      cur = cur->p_next_ccb;
    }
    return cnt;
  }
} tL2C_LCB;

/* Define the L2CAP control structure