From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
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 [thread overview]
Message-ID: <20171102144352.32353-4-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20171102144352.32353-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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
next prev parent reply other threads:[~2017-11-02 14:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 14:43 [PATCH v2 1/7] doc/advertising-api: Add Duration and Timeout Luiz Augusto von Dentz
2017-11-02 14:43 ` [PATCH v2 2/7] advertising: Add implementation of " Luiz Augusto von Dentz
2017-11-02 14:43 ` [PATCH v2 3/7] client: Add set-advertise-{duration, timeout} Luiz Augusto von Dentz
2017-11-10 6:40 ` ERAMOTO Masaya
2017-11-10 12:06 ` Luiz Augusto von Dentz
2017-11-13 5:15 ` ERAMOTO Masaya
2017-11-02 14:43 ` Luiz Augusto von Dentz [this message]
2017-11-02 14:43 ` [PATCH v2 5/7] core: Add LEAdvertisement1 to bluetooth.conf Luiz Augusto von Dentz
2017-11-02 14:43 ` [PATCH v2 6/7] core: Cleanup bluetooth.conf Luiz Augusto von Dentz
2017-11-02 14:43 ` [PATCH v2 7/7] tests: Remove test-thermometer Luiz Augusto von Dentz
2017-11-03 11:21 ` [PATCH v2 1/7] doc/advertising-api: Add Duration and Timeout Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171102144352.32353-4-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).