summaryrefslogtreecommitdiff
path: root/client/advertising.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-05-14 15:10:26 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-05-14 17:25:52 -0700
commitc3159848b91ade4339fc5ce353a593e411c7756b (patch)
treea1471b4e12678da21802c7bab8228fb85a307137 /client/advertising.c
parent5dba69086d33480047969146200f489f05ccf307 (diff)
downloadbluez-c3159848b91ade4339fc5ce353a593e411c7756b.tar.gz
client: Fix advertise broadcast
When advertising with type broadcast it cannot be discoverable as that would require setting flags which is not allowed by the spec.
Diffstat (limited to 'client/advertising.c')
-rw-r--r--client/advertising.c3
1 files changed, 3 insertions, 0 deletions
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");