Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf fromtree] Bluetooth: att: don't re-use the ATT buffer for confir… #1335

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions subsys/bluetooth/host/att.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,13 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t

switch (att_op_get_type(op)) {
case ATT_RESPONSE:
case ATT_CONFIRMATION:
/* Use a timeout only when responding/confirming */
/* Use a timeout only when responding */
timeout = BT_ATT_TIMEOUT;
re_use = true;
break;
case ATT_CONFIRMATION:
timeout = BT_ATT_TIMEOUT;
break;
default:
timeout = K_FOREVER;
}
Expand All @@ -701,7 +703,7 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t
* This is better than an assert as an assert would
* allow a peer to DoS us.
*/
LOG_ERR("already processing a transaction on chan %p", chan);
LOG_ERR("already processing a REQ/RSP on chan %p", chan);

return NULL;
}
Expand Down