* [PATCH BlueZ] media: Fix UnregisterApplication
@ 2021-06-23 22:45 Luiz Augusto von Dentz
2021-06-24 20:13 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2021-06-23 22:45 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
UnregisterApplication is not doing anything since the apps queue is
never initialized which results in not finding any application when
unregistering.
Fixes: https://github.com/bluez/bluez/issues/126
---
profiles/audio/media.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index c84bbe22d..267722542 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -2384,6 +2384,8 @@ static void path_free(void *data)
{
struct media_adapter *adapter = data;
+ queue_destroy(adapter->apps, app_free);
+
while (adapter->endpoints)
release_endpoint(adapter->endpoints->data);
@@ -2402,6 +2404,7 @@ int media_register(struct btd_adapter *btd_adapter)
adapter = g_new0(struct media_adapter, 1);
adapter->btd_adapter = btd_adapter_ref(btd_adapter);
+ adapter->apps = queue_new();
if (!g_dbus_register_interface(btd_get_dbus_connection(),
adapter_get_path(btd_adapter),
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] media: Fix UnregisterApplication
2021-06-23 22:45 [PATCH BlueZ] media: Fix UnregisterApplication Luiz Augusto von Dentz
@ 2021-06-24 20:13 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2021-06-24 20:13 UTC (permalink / raw)
To: linux-bluetooth
Hi,
On Wed, Jun 23, 2021 at 3:45 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> UnregisterApplication is not doing anything since the apps queue is
> never initialized which results in not finding any application when
> unregistering.
>
> Fixes: https://github.com/bluez/bluez/issues/126
> ---
> profiles/audio/media.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/profiles/audio/media.c b/profiles/audio/media.c
> index c84bbe22d..267722542 100644
> --- a/profiles/audio/media.c
> +++ b/profiles/audio/media.c
> @@ -2384,6 +2384,8 @@ static void path_free(void *data)
> {
> struct media_adapter *adapter = data;
>
> + queue_destroy(adapter->apps, app_free);
> +
> while (adapter->endpoints)
> release_endpoint(adapter->endpoints->data);
>
> @@ -2402,6 +2404,7 @@ int media_register(struct btd_adapter *btd_adapter)
>
> adapter = g_new0(struct media_adapter, 1);
> adapter->btd_adapter = btd_adapter_ref(btd_adapter);
> + adapter->apps = queue_new();
>
> if (!g_dbus_register_interface(btd_get_dbus_connection(),
> adapter_get_path(btd_adapter),
> --
> 2.31.1
Pushed.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-24 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 22:45 [PATCH BlueZ] media: Fix UnregisterApplication Luiz Augusto von Dentz
2021-06-24 20:13 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).