OSDN Git Service

Add checking if profiles are requesting connection
authorClaudio Takahasi <claudio.takahasi@openbossa.org>
Tue, 4 Oct 2011 18:31:09 +0000 (15:31 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 5 Oct 2011 15:01:27 +0000 (18:01 +0300)
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

index c3eaf45..78a925c 100644 (file)
@@ -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);
 }