diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-11-02 16:08:11 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-11-02 16:41:22 +0200 |
commit | 3bf46c4bd7e2e64918fc2ecbc6145a18f7cc5db0 (patch) | |
tree | cf7493b25c3e204378a70659847ae5072a93d027 | |
parent | 068e0ba214b9f4ec448a6f28be969d974094e5b4 (diff) | |
download | bluez-3bf46c4bd7e2e64918fc2ecbc6145a18f7cc5db0.tar.gz |
advertising: Use client proxy to release
This uses g_dbus_proxy_method_call instead of build the message
manually.
-rw-r--r-- | src/advertising.c | 13 |
1 files 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) |