From b723fafbbe582344e65e37ba1732a240cbd764cb Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 10 May 2019 14:58:09 +0300 Subject: [PATCH] client: Fix crash when setting advertising.discoverable on DBUS_TYPE_BOOLEAN expect a pointer to dbus_bool_t not bool. --- client/advertising.c | 5 +++-- 1 file 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; } -- 2.47.3