forked from pool/bluez
Accepting request 882472 from home:acho:branches:Base:System
Fix Bluetooth headphones disconnect periodically.bsc#1183821 OBS-URL: https://build.opensuse.org/request/show/882472 OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=304
This commit is contained in:
parent
5d941bcc5a
commit
5de753cbc0
@ -0,0 +1,43 @@
|
|||||||
|
From 28ddec8d6b829e002fa268c07b71e4c564ba9e16 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||||
|
Date: Thu, 11 Mar 2021 07:36:07 -0800
|
||||||
|
Subject: [PATCH] avdtp: Fix removing all remote SEPs when loading from cache
|
||||||
|
|
||||||
|
If avdtp_discover is called after cache has been loaded it end up
|
||||||
|
removing all remote SEPs as they have not been discovered yet.
|
||||||
|
|
||||||
|
Fixes: https://github.com/bluez/bluez/issues/102
|
||||||
|
---
|
||||||
|
profiles/audio/avdtp.c | 16 ++++++++++++----
|
||||||
|
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
|
||||||
|
index 088ca58b3..1d5871c62 100644
|
||||||
|
--- a/profiles/audio/avdtp.c
|
||||||
|
+++ b/profiles/audio/avdtp.c
|
||||||
|
@@ -3381,10 +3381,18 @@ int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb,
|
||||||
|
session->discover = g_new0(struct discover_callback, 1);
|
||||||
|
|
||||||
|
if (session->seps) {
|
||||||
|
- session->discover->cb = cb;
|
||||||
|
- session->discover->user_data = user_data;
|
||||||
|
- session->discover->id = g_idle_add(process_discover, session);
|
||||||
|
- return 0;
|
||||||
|
+ struct avdtp_remote_sep *sep = session->seps->data;
|
||||||
|
+
|
||||||
|
+ /* Check that SEP have been discovered as it may be loaded from
|
||||||
|
+ * cache.
|
||||||
|
+ */
|
||||||
|
+ if (sep->discovered) {
|
||||||
|
+ session->discover->cb = cb;
|
||||||
|
+ session->discover->user_data = user_data;
|
||||||
|
+ session->discover->id = g_idle_add(process_discover,
|
||||||
|
+ session);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
err = send_request(session, FALSE, NULL, AVDTP_DISCOVER, NULL, 0);
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 1 04:27:37 UTC 2021 - Al Cho <acho@suse.com>
|
||||||
|
|
||||||
|
- add bluez-avdtp-Fix-removing-all-remote-SEPs-when-loading-from.patch
|
||||||
|
Fix Bluetooth headphones disconnect periodically(bsc#1183821)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 24 20:25:23 UTC 2021 - Stefan Seyfried <seife+obs@b1-systems.com>
|
Wed Feb 24 20:25:23 UTC 2021 - Stefan Seyfried <seife+obs@b1-systems.com>
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ Patch4: bluez-disable-broken-tests.diff
|
|||||||
Patch5: bluez-test-2to3.diff
|
Patch5: bluez-test-2to3.diff
|
||||||
# Move 43xx firmware path for RPi3 bluetooth support bsc#1140688
|
# Move 43xx firmware path for RPi3 bluetooth support bsc#1140688
|
||||||
Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch
|
Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch
|
||||||
|
Patch11: bluez-avdtp-Fix-removing-all-remote-SEPs-when-loading-from.patch
|
||||||
# Upstream suggests to use btmon instead of hcidump and does not want those patches
|
# Upstream suggests to use btmon instead of hcidump and does not want those patches
|
||||||
# => PATCH-FIX-OPENSUSE for those two :-)
|
# => PATCH-FIX-OPENSUSE for those two :-)
|
||||||
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
|
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user