All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miao-chen Chou <mcchou@chromium.org>
To: Bluetooth Kernel Mailing List <linux-bluetooth@vger.kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Alain Michaud <alainm@chromium.org>,
	Howard Chung <howardchung@google.com>,
	chromeos-bluetooth-upstreaming@chromium.org,
	Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
	Manish Mandlik <mmandlik@chromium.org>,
	Miao-chen Chou <mcchou@chromium.org>
Subject: [BlueZ PATCH v4 7/8] adv_monitor: Fix return type of RegisterMonitor() method
Date: Thu, 17 Sep 2020 00:10:43 -0700	[thread overview]
Message-ID: <20200917001020.BlueZ.v4.7.Ic8dbe9115e82704b4c0c860eee27ad897db13237@changeid> (raw)
In-Reply-To: <20200917001020.BlueZ.v4.1.I2830b9c1212a64b062201ed9f2b71294f50ad22d@changeid>

This modifies the D-Bus call return type to be asynchronous for
RegisterMonitor() method call.

The following test was performed:
- Enter bluetoothctl, exit the console and re-enter the console without
AlreadyExist error for RegisterMonitor() upon bring-up of the console.

Reviewed-by: Howard Chung <howardchung@google.com>
Reviewed-by: Manish Mandlik <mmandlik@chromium.org>
---

(no changes since v1)

 src/adv_monitor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/adv_monitor.c b/src/adv_monitor.c
index deaa1894a..b4fe39eff 100644
--- a/src/adv_monitor.c
+++ b/src/adv_monitor.c
@@ -758,6 +758,8 @@ static struct adv_monitor_app *app_create(DBusConnection *conn,
 
 	app->monitors = queue_new();
 
+	app->reg = dbus_message_ref(msg);
+
 	g_dbus_client_set_disconnect_watch(app->client, app_disconnect_cb, app);
 
 	/* Note that any property changes on a monitor object would not affect
@@ -769,8 +771,6 @@ static struct adv_monitor_app *app_create(DBusConnection *conn,
 
 	g_dbus_client_set_ready_watch(app->client, app_ready_cb, app);
 
-	app->reg = dbus_message_ref(msg);
-
 	return app;
 }
 
@@ -864,7 +864,7 @@ static DBusMessage *unregister_monitor(DBusConnection *conn,
 }
 
 static const GDBusMethodTable adv_monitor_methods[] = {
-	{ GDBUS_EXPERIMENTAL_METHOD("RegisterMonitor",
+	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("RegisterMonitor",
 					GDBUS_ARGS({ "application", "o" }),
 					NULL, register_monitor) },
 	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("UnregisterMonitor",
-- 
2.26.2


  parent reply	other threads:[~2020-09-17  7:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  7:10 [BlueZ PATCH v4 1/8] adv_monitor: Implement RSSI Filter logic for background scanning Miao-chen Chou
2020-09-17  7:10 ` [BlueZ PATCH v4 2/8] adv_monitor: Implement unit tests for RSSI Filter Miao-chen Chou
2020-09-17  7:29   ` [BlueZ,v4,2/8] " bluez.test.bot
2020-09-17  7:10 ` [BlueZ PATCH v4 3/8] adv_monitor: Implement Adv matching based on stored monitors Miao-chen Chou
2020-09-17  7:10 ` [BlueZ PATCH v4 4/8] adv_monitor: Implement unit tests for content filter Miao-chen Chou
2020-09-17  7:10 ` [BlueZ PATCH v4 5/8] adapter: Clear all Adv monitors upon bring-up Miao-chen Chou
2020-09-17  7:10 ` [BlueZ PATCH v4 6/8] adv_monitor: Implement Add Adv Patterns Monitor cmd handler Miao-chen Chou
2020-09-17  7:10 ` Miao-chen Chou [this message]
2020-09-17  7:10 ` [BlueZ PATCH v4 8/8] adv_monitor: Issue Remove Adv Monitor mgmt call Miao-chen Chou
2020-09-17  7:32 ` [BlueZ,v4,1/8] adv_monitor: Implement RSSI Filter logic for background scanning bluez.test.bot
2020-09-17 21:25 [BlueZ PATCH v4 1/8] " Miao-chen Chou
2020-09-17 21:25 ` [BlueZ PATCH v4 7/8] adv_monitor: Fix return type of RegisterMonitor() method Miao-chen Chou

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=20200917001020.BlueZ.v4.7.Ic8dbe9115e82704b4c0c860eee27ad897db13237@changeid \
    --to=mcchou@chromium.org \
    --cc=alainm@chromium.org \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=howardchung@google.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.von.dentz@intel.com \
    --cc=marcel@holtmann.org \
    --cc=mmandlik@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.