shared/bap: bap_abort_stream_req() should cancel also current req - bluez.git (original) (raw)

author Pauli Virtanen pav@iki.fi 2025-05-04 19:01:55 +0300
committer Luiz Augusto von Dentz luiz.von.dentz@intel.com 2025-05-06 13:00:36 -0400
commit 62f0b9b539bc4ab53936149f74a39ed88da69ee1 (patch)
tree ef40728003d9739bf29ad616c94aa711ad80f4c6
parent 8d0f178974f8828c55adba58b01bbc70b0f9f7cd (diff)

shared/bap: bap_abort_stream_req() should cancel also current reqHEADmaster

After bap_abort_stream_req() no req callbacks for stream shall be called, so it has to fail also the currently in-flight request.

-rw-r--r-- src/shared/bap.c 7

1 files changed, 7 insertions, 0 deletions

diff --git a/src/shared/bap.c b/src/shared/bap.c
index ca3a9e5c3a..4bb6e08b53 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c

@@ -1298,6 +1298,13 @@ static void bap_abort_stream_req(struct bt_bap *bap,

struct bt_bap_stream *stream)

{

queue_remove_all(bap->reqs, match_req_stream, stream, bap_req_abort);

+ if (bap->req && bap->req->stream == stream) {

+ struct bt_bap_req *req = bap->req;

+ bap->req = NULL;

+ bap_req_complete(req, NULL);

+ }

}

static void bt_bap_stream_unref(void *data)