summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-08-10 14:59:12 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-08-10 14:59:12 -0700
commitf287a42cd63e5562ada77298c5926a36771e45b8 (patch)
treead1984b6f056dafe0e813247a5f5588cc0955711 /client
parented664d9897b92cf117445dd141ffc6891d305f51 (diff)
downloadbluez-f287a42cd63e5562ada77298c5926a36771e45b8.tar.gz
client/advertising: Fix not disabling local-name in Includes
When setting a advertising.name other than on/off it shall also disable local-name flag from Includes as that would cause an error when parsed by the daemon.
Diffstat (limited to 'client')
-rw-r--r--client/advertising.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/advertising.c b/client/advertising.c
index e40086c98..f4678e978 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -888,6 +888,13 @@ void ad_advertise_local_name(DBusConnection *conn, const char *name)
g_dbus_emit_property_changed(conn, AD_PATH, AD_IFACE, "LocalName");
+ /* Remove local-name from Includes since LocalName would be set */
+ if (ad.name) {
+ ad.name = false;
+ g_dbus_emit_property_changed(conn, AD_PATH, AD_IFACE,
+ "Includes");
+ }
+
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}