Skip to content
Closed
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
11 changes: 5 additions & 6 deletions subsys/bluetooth/host/att.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,9 @@ static void att_reset(struct bt_att *att)
k_sem_give(&att->tx_sem);
}

/* Notify outstanding request */
att_handle_rsp(att, NULL, 0, BT_ATT_ERR_UNLIKELY);

/* Notify pending requests */
SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&att->reqs, req, tmp, node) {
if (req->func) {
Expand All @@ -2014,12 +2017,8 @@ static void att_reset(struct bt_att *att)
/* Reset list */
sys_slist_init(&att->reqs);

if (!att->req) {
return;
}

/* Notify outstanding request */
att_handle_rsp(att, NULL, 0, BT_ATT_ERR_UNLIKELY);
/* Remove active ATT req that has been freed */
att->req = NULL;
}

static void att_timeout(struct k_work *work)
Expand Down