diff mbox series

[BlueZ] device: Fix not auto-connecting profile

Message ID 20220801222113.2269509-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit d06b4a6b74d4da0b997c981e1d506bf051f1a84d
Headers show
Series [BlueZ] device: Fix not auto-connecting profile | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/incremental_build success Pass
tedd_an/scan_build success Pass

Commit Message

Luiz Augusto von Dentz Aug. 1, 2022, 10:21 p.m. UTC
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(-)

Comments

bluez.test.bot@gmail.com Aug. 1, 2022, 11:08 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=664633

---Test result---

Test Summary:
CheckPatch                    PASS      1.42 seconds
GitLint                       PASS      0.98 seconds
Prep - Setup ELL              PASS      27.75 seconds
Build - Prep                  PASS      0.87 seconds
Build - Configure             PASS      8.83 seconds
Build - Make                  PASS      998.27 seconds
Make Check                    PASS      12.19 seconds
Make Check w/Valgrind         PASS      290.64 seconds
Make Distcheck                PASS      243.01 seconds
Build w/ext ELL - Configure   PASS      8.97 seconds
Build w/ext ELL - Make        PASS      83.75 seconds
Incremental Build w/ patches  PASS      101.40 seconds
Scan Build                    PASS      527.25 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 2, 2022, 7:50 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon,  1 Aug 2022 15:21:13 -0700 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [BlueZ] device: Fix not auto-connecting profile
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d06b4a6b74d4

You are awesome, thank you!
diff mbox series

Patch

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);