mirror of
https://github.com/espressif/esp-idf
synced 2025-03-31 03:41:07 -04:00
components/bt: Fixed the problem of early release of pointer(p_ccb) in funcion
This commit is contained in:
parent
b1b673eaa2
commit
9ca6aee845
@ -3493,13 +3493,12 @@ BT_HDR *l2cu_get_next_buffer_to_send (tL2C_LCB *p_lcb)
|
|||||||
L2CAP_TRACE_ERROR("l2cu_get_buffer_to_send: No data to be sent");
|
L2CAP_TRACE_ERROR("l2cu_get_buffer_to_send: No data to be sent");
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
l2cu_check_channel_congestion (p_ccb);
|
||||||
|
l2cu_set_acl_hci_header (p_buf, p_ccb);
|
||||||
/* send tx complete */
|
/* send tx complete */
|
||||||
if (l2cb.fixed_reg[xx].pL2CA_FixedTxComplete_Cb) {
|
if (l2cb.fixed_reg[xx].pL2CA_FixedTxComplete_Cb) {
|
||||||
(*l2cb.fixed_reg[xx].pL2CA_FixedTxComplete_Cb)(p_ccb->local_cid, 1);
|
(*l2cb.fixed_reg[xx].pL2CA_FixedTxComplete_Cb)(p_ccb->local_cid, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
l2cu_check_channel_congestion (p_ccb);
|
|
||||||
l2cu_set_acl_hci_header (p_buf, p_ccb);
|
|
||||||
return (p_buf);
|
return (p_buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user