diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-01-23 13:06:07 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-01-23 13:26:17 -0800 |
commit | d159973ecec8e65add01cb5ed8213e0ba8703965 (patch) | |
tree | 229b03d99695e1201b321e8eed172be0e2138c61 /src/shared | |
parent | a1736d8990ff56bba453ff81a25156316bdd118f (diff) | |
download | bluez-d159973ecec8e65add01cb5ed8213e0ba8703965.tar.gz |
shared/bap: Fix not detaching streams when PAC is removed
When local PAC is removed we attempt to release the streams but we left
it still attached to the endpoint, so this makes sure the stream is
properly detached by setting its state to idle.
Fixes: https://github.com/bluez/bluez/issues/457
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/bap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/bap.c b/src/shared/bap.c index db7def799..4ba65cbaa 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -2478,8 +2478,10 @@ static void remove_streams(void *data, void *user_data) struct bt_bap_stream *stream; stream = queue_remove_if(bap->streams, match_stream_lpac, pac); - if (stream) + if (stream) { bt_bap_stream_release(stream, NULL, NULL); + stream_set_state(stream, BT_BAP_STREAM_STATE_IDLE); + } } bool bt_bap_remove_pac(struct bt_bap_pac *pac) |