components/bt: Consider link_xmit_data_q in congest events to prevent excessive memory usage
This commit is contained in:
parent
d53a2719b9
commit
7f299d9d60
1 changed files with 1 additions and 1 deletions
|
@ -3662,7 +3662,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
|
|||
} else {
|
||||
tL2C_LCB *p_lcb = p_ccb->p_lcb;
|
||||
/* If this channel was not congested but it is congested now, tell the app */
|
||||
if ((q_count > p_ccb->buff_quota) || (p_lcb && (p_ccb->local_cid == L2CAP_ATT_CID) && (p_lcb->link_xmit_quota > 0) && (p_lcb->link_xmit_quota <= p_lcb->sent_not_acked))) {
|
||||
if (q_count > p_ccb->buff_quota || (p_lcb && (p_lcb->link_xmit_data_q) && (list_length(p_lcb->link_xmit_data_q) + q_count) > p_ccb->buff_quota)) {
|
||||
p_ccb->cong_sent = TRUE;
|
||||
if (p_ccb->p_rcb && p_ccb->p_rcb->api.pL2CA_CongestionStatus_Cb) {
|
||||
L2CAP_TRACE_DEBUG ("L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%04x,XmitQ:%u,Quota:%u",
|
||||
|
|
Loading…
Reference in a new issue