summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-08-01 15:19:13 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-08-01 15:19:13 -0700
commitd06b4a6b74d4da0b997c981e1d506bf051f1a84d (patch)
tree127b23c5ab3816022f44334b30e2efc73b408195 /src/device.c
parentcb42377ae002c52ea436718aa99007bb8659f83a (diff)
downloadbluez-d06b4a6b74d4da0b997c981e1d506bf051f1a84d.tar.gz
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
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c3
1 files changed, 2 insertions, 1 deletions
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);