diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2019-05-10 14:58:09 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2019-05-10 14:58:09 +0300 |
commit | b723fafbbe582344e65e37ba1732a240cbd764cb (patch) | |
tree | 429ca7abba68cf380ac2cc7ea95fa3b76a32d18d /client | |
parent | 8784c67d35e2d95902fb17cd799abaf132b416a9 (diff) | |
download | bluez-b723fafbbe582344e65e37ba1732a240cbd764cb.tar.gz |
client: Fix crash when setting advertising.discoverable on
DBUS_TYPE_BOOLEAN expect a pointer to dbus_bool_t not bool.
Diffstat (limited to 'client')
-rw-r--r-- | client/advertising.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/advertising.c b/client/advertising.c index 72f91b9a5..afc8754df 100644 --- a/client/advertising.c +++ b/client/advertising.c @@ -421,8 +421,9 @@ static gboolean discoverable_exists(const GDBusPropertyTable *property, static gboolean get_discoverable(const GDBusPropertyTable *property, DBusMessageIter *iter, void *user_data) { - dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, - &ad.discoverable); + dbus_bool_t value = ad.discoverable; + + dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &value); return TRUE; } |