diff options
Diffstat (limited to 'net-wireless/bluez/files')
-rw-r--r-- | net-wireless/bluez/files/bluez-5.51-disconnect-timeout.patch | 104 | ||||
-rw-r--r-- | net-wireless/bluez/files/bluez-5.51-include-limits-h.patch | 64 |
2 files changed, 168 insertions, 0 deletions
diff --git a/net-wireless/bluez/files/bluez-5.51-disconnect-timeout.patch b/net-wireless/bluez/files/bluez-5.51-disconnect-timeout.patch new file mode 100644 index 000000000000..2f6e7c8c4d95 --- /dev/null +++ b/net-wireless/bluez/files/bluez-5.51-disconnect-timeout.patch @@ -0,0 +1,104 @@ +From 52faac4648500dd45c06b6aa41f1be426c43a125 Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> +Date: Fri, 11 Oct 2019 15:40:04 +0300 +Subject: audio: Fix cancelling disconnect timeout + +If AVDTP session has been connected but no stream has been setup calls +to service->connect would return -EBUSY to avoid stream setup collision +but it also takes a reference to the session cancelling the disconnect +timeout and disabling the stream_setup logic that would attempt to +estabilish a stream. +--- + profiles/audio/sink.c | 25 ++++++++++++------------- + profiles/audio/source.c | 25 ++++++++++++------------- + 2 files changed, 24 insertions(+), 26 deletions(-) + +diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c +index 7cac21034..966440534 100644 +--- a/profiles/audio/sink.c ++++ b/profiles/audio/sink.c +@@ -256,11 +256,18 @@ gboolean sink_setup_stream(struct btd_service *service, struct avdtp *session) + if (sink->connect_id > 0 || sink->disconnect_id > 0) + return FALSE; + +- if (session && !sink->session) +- sink->session = avdtp_ref(session); +- +- if (!sink->session) +- return FALSE; ++ if (!sink->session) { ++ if (session) ++ sink->session = avdtp_ref(session); ++ else ++ sink->session = a2dp_avdtp_get( ++ btd_service_get_device(service)); ++ ++ if (!sink->session) { ++ DBG("Unable to get a session"); ++ return FALSE; ++ } ++ } + + sink->connect_id = a2dp_discover(sink->session, discovery_complete, + sink); +@@ -274,14 +281,6 @@ int sink_connect(struct btd_service *service) + { + struct sink *sink = btd_service_get_user_data(service); + +- if (!sink->session) +- sink->session = a2dp_avdtp_get(btd_service_get_device(service)); +- +- if (!sink->session) { +- DBG("Unable to get a session"); +- return -EIO; +- } +- + if (sink->connect_id > 0 || sink->disconnect_id > 0) + return -EBUSY; + +diff --git a/profiles/audio/source.c b/profiles/audio/source.c +index 4081e1970..0ac20fe40 100644 +--- a/profiles/audio/source.c ++++ b/profiles/audio/source.c +@@ -257,11 +257,18 @@ gboolean source_setup_stream(struct btd_service *service, + if (source->connect_id > 0 || source->disconnect_id > 0) + return FALSE; + +- if (session && !source->session) +- source->session = avdtp_ref(session); +- +- if (!source->session) +- return FALSE; ++ if (!source->session) { ++ if (session) ++ source->session = avdtp_ref(session); ++ else ++ source->session = a2dp_avdtp_get( ++ btd_service_get_device(service)); ++ ++ if (!source->session) { ++ DBG("Unable to get a session"); ++ return FALSE; ++ } ++ } + + source->connect_id = a2dp_discover(source->session, discovery_complete, + source); +@@ -275,14 +282,6 @@ int source_connect(struct btd_service *service) + { + struct source *source = btd_service_get_user_data(service); + +- if (!source->session) +- source->session = a2dp_avdtp_get(btd_service_get_device(service)); +- +- if (!source->session) { +- DBG("Unable to get a session"); +- return -EIO; +- } +- + if (source->connect_id > 0 || source->disconnect_id > 0) + return -EBUSY; + +-- +cgit 1.2-0.3.lf.el7 + diff --git a/net-wireless/bluez/files/bluez-5.51-include-limits-h.patch b/net-wireless/bluez/files/bluez-5.51-include-limits-h.patch new file mode 100644 index 000000000000..ccbc152a4ee1 --- /dev/null +++ b/net-wireless/bluez/files/bluez-5.51-include-limits-h.patch @@ -0,0 +1,64 @@ +From 20128c5c95fbae93c9fd996d5ad2584cf6ad8032 Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Mon, 30 Sep 2019 18:35:56 -0500 +Subject: [PATCH] Include limits.h for PATH_MAX + +Signed-off-by: Jory Pratt <anarchy@gentoo.org> +--- + mesh/keyring.c | 1 + + mesh/mesh-config-json.c | 1 + + mesh/node.c | 1 + + mesh/util.c | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/mesh/keyring.c b/mesh/keyring.c +index 3a7f92f..9fa7d6b 100644 +--- a/mesh/keyring.c ++++ b/mesh/keyring.c +@@ -24,6 +24,7 @@ + #define _GNU_SOURCE + #include <fcntl.h> + #include <dirent.h> ++#include <limits.h> + #include <stdio.h> + #include <unistd.h> + #include <dirent.h> +diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c +index cafa2fd..74ca495 100644 +--- a/mesh/mesh-config-json.c ++++ b/mesh/mesh-config-json.c +@@ -27,6 +27,7 @@ + #include <fcntl.h> + #include <ftw.h> + #include <libgen.h> ++#include <limits.h> + #include <stdio.h> + #include <string.h> + #include <unistd.h> +diff --git a/mesh/node.c b/mesh/node.c +index b6824f5..15dcb97 100644 +--- a/mesh/node.c ++++ b/mesh/node.c +@@ -23,6 +23,7 @@ + + #define _GNU_SOURCE + #include <dirent.h> ++#include <limits.h> + #include <stdio.h> + #include <sys/time.h> + +diff --git a/mesh/util.c b/mesh/util.c +index 1455bde..986ba4b 100644 +--- a/mesh/util.c ++++ b/mesh/util.c +@@ -25,6 +25,7 @@ + #include <dirent.h> + #include <ftw.h> + #include <stdio.h> ++#include <limits.h> + #include <time.h> + #include <sys/time.h> + +-- +2.23.0 + |