From 37965985203fbdcb271ceadeca2733387b209cb4 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 4 Oct 2011 15:31:09 -0300 Subject: [PATCH] Add checking if profiles are requesting connection Before triggering automatic ATTIO connections driven by platform event, the device needs to check if there is at least one entry in the ATTIO connection callback, meaning that there is profile requesting connection and the state is auto connection. --- src/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/device.c b/src/device.c index c3eaf450d..78a925cd9 100644 --- a/src/device.c +++ b/src/device.c @@ -2027,6 +2027,9 @@ void device_set_auto_connect(struct btd_device *device, gboolean enable) return; } + if (device->attios == NULL && device->attios_offline == NULL) + return; + g_idle_add(att_connect, device); } -- 2.47.3