diff mbox series

[v3,1/5] shared/bap: Fix not detaching streams when PAC is removed

Message ID 20230126201242.4110305-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit d159973ecec8e65add01cb5ed8213e0ba8703965
Headers show
Series [v3,1/5] shared/bap: Fix not detaching streams when PAC is removed | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz Jan. 26, 2023, 8:12 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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
---
 src/shared/bap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Jan. 26, 2023, 10:26 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=715998

---Test result---

Test Summary:
CheckPatch                    FAIL      2.59 seconds
GitLint                       PASS      1.37 seconds
BuildEll                      PASS      28.29 seconds
BluezMake                     PASS      884.46 seconds
MakeCheck                     PASS      11.06 seconds
MakeDistcheck                 PASS      151.11 seconds
CheckValgrind                 PASS      249.55 seconds
CheckSmatch                   PASS      331.28 seconds
bluezmakeextell               PASS      99.03 seconds
IncrementalBuild              PASS      3699.68 seconds
ScanBuild                     PASS      1031.10 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v3,4/5] bap: Fix not checking if request fits when grouping
WARNING:REPEATED_WORD: Possible repeated word: 'that'
#86: 
without attempt to check that that would fit in the ATT MTU causing the

/github/workspace/src/src/13117701.patch total: 0 errors, 1 warnings, 69 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13117701.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Jan. 27, 2023, 8:10 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 26 Jan 2023 12:12:38 -0800 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> 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
> 
> [...]

Here is the summary with links:
  - [v3,1/5] shared/bap: Fix not detaching streams when PAC is removed
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d159973ecec8
  - [v3,2/5] bap: Fix not setting stream to NULL
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=414c8650acfe
  - [v3,3/5] bap: Fix not removing endpoint if local PAC is unregistered
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8aed9db4b13f
  - [v3,4/5] bap: Fix not checking if request fits when grouping
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=814e3535a1bc
  - [v3,5/5] bap: Fix registering multiple endpoint for the same PAC set
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b61044d52917

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index db7def7999b7..4ba65cbaa8f9 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)