From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] device: Fix not auto-connecting profile
Date: Mon, 1 Aug 2022 15:21:13 -0700 [thread overview]
Message-ID: <20220801222113.2269509-1-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the profile is registered and marked to auto-connect it shall
automatically be connected whenever a device is already connected.
Fixes: https://github.com/bluez/bluez/issues/370
---
src/device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/device.c b/src/device.c
index 9a4f2ce45..775003796 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4574,7 +4574,8 @@ void device_probe_profile(gpointer a, gpointer b)
device->services = g_slist_append(device->services, service);
- if (!profile->auto_connect || !device->general_connect)
+ if (!profile->auto_connect || (!btd_device_is_connected(device) &&
+ !device->general_connect))
return;
device->pending = g_slist_append(device->pending, service);
--
2.37.1
next reply other threads:[~2022-08-01 22:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 22:21 Luiz Augusto von Dentz [this message]
2022-08-01 23:08 ` [BlueZ] device: Fix not auto-connecting profile bluez.test.bot
2022-08-02 19:50 ` [PATCH BlueZ] " patchwork-bot+bluetooth
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=20220801222113.2269509-1-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