Bluetooth: ATT: Fix disconnected ATT not releasing buffers
Fix bug in ATT reset handling, not releasing queued notification buffers when the connection is terminated. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
885b1ee7de
commit
4bca0f3d33
1 changed files with 2 additions and 2 deletions
|
@ -2054,18 +2054,18 @@ static void att_reset(struct bt_att *att)
|
|||
{
|
||||
struct bt_att_req *req, *tmp;
|
||||
int i;
|
||||
#if CONFIG_BT_ATT_PREPARE_COUNT > 0
|
||||
struct net_buf *buf;
|
||||
|
||||
#if CONFIG_BT_ATT_PREPARE_COUNT > 0
|
||||
/* Discard queued buffers */
|
||||
while ((buf = k_fifo_get(&att->prep_queue, K_NO_WAIT))) {
|
||||
net_buf_unref(buf);
|
||||
}
|
||||
#endif /* CONFIG_BT_ATT_PREPARE_COUNT > 0 */
|
||||
|
||||
while ((buf = k_fifo_get(&att->tx_queue, K_NO_WAIT))) {
|
||||
net_buf_unref(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
atomic_set_bit(att->flags, ATT_DISCONNECTED);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue