From d06b4a6b74d4da0b997c981e1d506bf051f1a84d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 1 Aug 2022 15:19:13 -0700 Subject: [PATCH] device: Fix not auto-connecting profile 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.47.3