From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 3/5] bap: Fix not removing endpoint if local PAC is unregistered
Date: Thu, 26 Jan 2023 12:12:40 -0800 [thread overview]
Message-ID: <20230126201242.4110305-3-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20230126201242.4110305-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If local PAC is unregistered it would also notify via pac_removed
callback which shall unregister the endpoint D-Bus object.
Fixes: https://github.com/bluez/bluez/issues/457#issuecomment-1402178691
---
profiles/audio/bap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 8f24117681d2..5a50a2cc6105 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1049,12 +1049,12 @@ static void pac_added(struct bt_bap_pac *pac, void *user_data)
bt_bap_foreach_pac(data->bap, BT_BAP_SINK, pac_found, service);
}
-static bool ep_match_rpac(const void *data, const void *match_data)
+static bool ep_match_pac(const void *data, const void *match_data)
{
const struct bap_ep *ep = data;
const struct bt_bap_pac *pac = match_data;
- return ep->rpac == pac;
+ return ep->rpac == pac || ep->lpac == pac;
}
static void pac_removed(struct bt_bap_pac *pac, void *user_data)
@@ -1082,7 +1082,7 @@ static void pac_removed(struct bt_bap_pac *pac, void *user_data)
return;
}
- ep = queue_remove_if(queue, ep_match_rpac, pac);
+ ep = queue_remove_if(queue, ep_match_pac, pac);
if (!ep)
return;
--
2.37.3
next prev parent reply other threads:[~2023-01-26 20:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 20:12 [PATCH v3 1/5] shared/bap: Fix not detaching streams when PAC is removed Luiz Augusto von Dentz
2023-01-26 20:12 ` [PATCH v3 2/5] bap: Fix not setting stream to NULL Luiz Augusto von Dentz
2023-01-26 20:12 ` Luiz Augusto von Dentz [this message]
2023-01-26 20:12 ` [PATCH v3 4/5] bap: Fix not checking if request fits when grouping Luiz Augusto von Dentz
2023-01-26 20:12 ` [PATCH v3 5/5] bap: Fix registering multiple endpoint for the same PAC set Luiz Augusto von Dentz
2023-01-26 22:26 ` [v3,1/5] shared/bap: Fix not detaching streams when PAC is removed bluez.test.bot
2023-01-27 20:10 ` [PATCH v3 1/5] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230126201242.4110305-3-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox