From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] client: Fix advertise broadcast
Date: Fri, 14 May 2021 16:58:54 -0700 [thread overview]
Message-ID: <20210514235854.143010-1-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When advertising with type broadcast it cannot be discoverable as that
would require setting flags which is not allowed by the spec.
---
client/advertising.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/client/advertising.c b/client/advertising.c
index 3bf12fe87..e40086c98 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -512,6 +512,9 @@ void ad_register(DBusConnection *conn, GDBusProxy *manager, const char *type)
g_free(ad.type);
ad.type = g_strdup(type);
+ if (!strcasecmp(ad.type, "Broadcast"))
+ ad.discoverable = false;
+
if (g_dbus_register_interface(conn, AD_PATH, AD_IFACE, ad_methods,
NULL, ad_props, NULL, NULL) == FALSE) {
bt_shell_printf("Failed to register advertising object\n");
--
2.30.2
next reply other threads:[~2021-05-14 23:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 23:58 Luiz Augusto von Dentz [this message]
2021-05-15 1:40 ` [BlueZ] client: Fix advertise broadcast bluez.test.bot
2021-05-17 21:53 ` Luiz Augusto von Dentz
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=20210514235854.143010-1-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;
as well as URLs for NNTP newsgroup(s).