diff mbox series

[BlueZ,1/2] sink: clean up outstanding AVDTP requests if the stream goes away.

Message ID 20241025202141.158946-1-daniel.beer@igorinstitute.com (mailing list archive)
State New
Headers show
Series [BlueZ,1/2] sink: clean up outstanding AVDTP requests if the stream goes away. | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T3 Title has trailing punctuation (.): "[BlueZ,1/2] sink: clean up outstanding AVDTP requests if the stream goes away."
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

Daniel Beer Oct. 25, 2024, 8:21 p.m. UTC
If the stream goes IDLE while we have an outstanding request, connect_id
stays non-zero and is never cleared via a completion callback. As a
consequence, the profile on this device will never be connected
successfully again until BlueZ restarts.
---
 profiles/audio/sink.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

bluez.test.bot@gmail.com Oct. 25, 2024, 10:28 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=903299

---Test result---

Test Summary:
CheckPatch                    PASS      0.91 seconds
GitLint                       FAIL      0.83 seconds
BuildEll                      PASS      25.55 seconds
BluezMake                     PASS      1648.59 seconds
MakeCheck                     PASS      13.47 seconds
MakeDistcheck                 PASS      180.02 seconds
CheckValgrind                 PASS      252.21 seconds
CheckSmatch                   PASS      354.83 seconds
bluezmakeextell               PASS      119.91 seconds
IncrementalBuild              PASS      2958.71 seconds
ScanBuild                     PASS      988.35 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,1/2] sink: clean up outstanding AVDTP requests if the stream goes away.

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T3 Title has trailing punctuation (.): "[BlueZ,1/2] sink: clean up outstanding AVDTP requests if the stream goes away."
[BlueZ,2/2] source: clean up outstanding AVDTP requests if the stream goes away.

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T3 Title has trailing punctuation (.): "[BlueZ,2/2] source: clean up outstanding AVDTP requests if the stream goes away."


---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index a547dcb41..77f195436 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
@@ -137,6 +137,11 @@  static void stream_state_changed(struct avdtp_stream *stream,
 	case AVDTP_STATE_IDLE:
 		btd_service_disconnecting_complete(sink->service, 0);
 
+		if (sink->connect_id > 0) {
+			a2dp_cancel(sink->connect_id);
+			sink->connect_id = 0;
+		}
+
 		if (sink->disconnect_id > 0) {
 			a2dp_cancel(sink->disconnect_id);
 			sink->disconnect_id = 0;