From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 2/2] device: Don't disable auto-connect for trusted devices
Date: Mon, 20 Nov 2017 15:42:44 +0200 [thread overview]
Message-ID: <20171120134244.24548-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20171120134244.24548-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Trusted shall indicate if the device is allowed connect in any
circumstance, even if the user has called device.Disconnect.
---
doc/device-api.txt | 6 +++---
src/device.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/device-api.txt b/doc/device-api.txt
index ac5604f9c..8b69c2ef3 100644
--- a/doc/device-api.txt
+++ b/doc/device-api.txt
@@ -52,9 +52,9 @@ Methods void Connect()
This method can be also used to cancel a preceding
Connect call before a reply to it has been received.
- When connected over LE bearer calling this method will
- prevent incoming connections until Connect method is
- called again.
+ For non-trusted devices connected over LE bearer calling
+ this method will disable incoming connections until
+ Connect method is called again.
Possible errors: org.bluez.Error.NotConnected
diff --git a/src/device.c b/src/device.c
index e8118112e..a753d2140 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1483,10 +1483,10 @@ static DBusMessage *dev_disconnect(DBusConnection *conn, DBusMessage *msg,
struct btd_device *device = user_data;
/*
- * Disable connections through passive scanning until
- * Device1.Connect is called
+ * If device is not trusted disable connections through passive
+ * scanning until Device1.Connect is called
*/
- if (device->auto_connect) {
+ if (device->auto_connect && !device->trusted) {
device->disable_auto_connect = TRUE;
device_set_auto_connect(device, FALSE);
}
--
2.13.6
next prev parent reply other threads:[~2017-11-20 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 13:42 [PATCH BlueZ 1/2] doc/device-api: Document behavior of Disconnect method with LE Luiz Augusto von Dentz
2017-11-20 13:42 ` Luiz Augusto von Dentz [this message]
2017-11-20 14:21 ` [PATCH BlueZ 2/2] device: Don't disable auto-connect for trusted devices Bastien Nocera
2017-11-20 15:13 ` [PATCH BlueZ 1/2] doc/device-api: Document behavior of Disconnect method with LE 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=20171120134244.24548-2-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).