Thread (3 messages) flat view 3 messages, 2 authors, 2021-05-17
STALE1955d

[PATCH BlueZ] client: Fix advertise broadcast

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2021-05-14 23:59:01
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help