Return-Path: From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 4/7] advertising: Use client proxy to release Date: Thu, 2 Nov 2017 16:43:49 +0200 Message-Id: <20171102144352.32353-4-luiz.dentz@gmail.com> In-Reply-To: <20171102144352.32353-1-luiz.dentz@gmail.com> References: <20171102144352.32353-1-luiz.dentz@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Luiz Augusto von Dentz This uses g_dbus_proxy_method_call instead of build the message manually. --- src/advertising.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/advertising.c b/src/advertising.c index 31a5fff5c..94a8c4050 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -137,20 +137,11 @@ static gboolean client_free_idle_cb(void *data) static void client_release(void *data) { struct btd_adv_client *client = data; - DBusMessage *message; DBG("Releasing advertisement %s, %s", client->owner, client->path); - message = dbus_message_new_method_call(client->owner, client->path, - LE_ADVERTISEMENT_IFACE, - "Release"); - - if (!message) { - error("Couldn't allocate D-Bus message"); - return; - } - - g_dbus_send_message(btd_get_dbus_connection(), message); + g_dbus_proxy_method_call(client->proxy, "Release", NULL, NULL, NULL, + NULL); } static void client_destroy(void *data) -- 2.13.6