diff mbox series

[BlueZ,v1] avdtp: Fix triggering disconnect_timeout while discovering capabilities

Message ID 20241015194254.543683-1-luiz.dentz@gmail.com (mailing list archive)
State New
Headers show
Series [BlueZ,v1] avdtp: Fix triggering disconnect_timeout while discovering capabilities | 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: T1 Title exceeds max length (82>80): "[BlueZ,v1] avdtp: Fix triggering disconnect_timeout while discovering capabilities"
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 Oct. 15, 2024, 7:42 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If there are many endpoint registered it may delay the discovering of
the capabilities long enough to trigger diconnect_timeout which may
cause unexpected collisions/disconnections.

Fixes: https://github.com/bluez/bluez/issues/981
---
 profiles/audio/avdtp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

bluez.test.bot@gmail.com Oct. 15, 2024, 9:43 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=899479

---Test result---

Test Summary:
CheckPatch                    PASS      0.44 seconds
GitLint                       FAIL      0.53 seconds
BuildEll                      PASS      27.53 seconds
BluezMake                     PASS      1671.68 seconds
MakeCheck                     PASS      12.96 seconds
MakeDistcheck                 PASS      182.32 seconds
CheckValgrind                 PASS      256.64 seconds
CheckSmatch                   PASS      360.94 seconds
bluezmakeextell               PASS      120.32 seconds
IncrementalBuild              PASS      1424.95 seconds
ScanBuild                     PASS      1010.25 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1] avdtp: Fix triggering disconnect_timeout while discovering capabilities

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: T1 Title exceeds max length (82>80): "[BlueZ,v1] avdtp: Fix triggering disconnect_timeout while discovering capabilities"


---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index 289b40827d88..80fbe847e043 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -2037,6 +2037,14 @@  failed:
 static gboolean avdtp_parse_cmd(struct avdtp *session, uint8_t transaction,
 				uint8_t signal_id, void *buf, int size)
 {
+	/* Reset disconnect timer if command is received */
+	if (session->dc_timer) {
+		timeout_remove(session->dc_timer);
+		session->dc_timer = timeout_add_seconds(session->dc_timeout,
+						disconnect_timeout,
+						session, NULL);
+	}
+
 	switch (signal_id) {
 	case AVDTP_DISCOVER:
 		DBG("Received DISCOVER_CMD");