summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-02-07 16:28:36 +0200
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-08-11 12:29:30 +0100
commitf3abf2a656feb0b46c66701360a33fec714a3abe (patch)
tree4b0baa0d0e66a8288f3e8f3a7fe8b08f684940a7
parent9ab97d96fea1002807dadbc198717567e1efca86 (diff)
downloadbluez-f3abf2a656feb0b46c66701360a33fec714a3abe.tar.gz
core/device: Use service auto_connect flag
This make use of service auto_connect flag to determine if the service should be included in the list to be connected.
-rw-r--r--src/device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index fc0516a70..6de3e7fe7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1623,7 +1623,6 @@ static int service_prio_cmp(gconstpointer a, gconstpointer b)
static GSList *create_pending_list(struct btd_device *dev, const char *uuid)
{
struct btd_service *service;
- struct btd_profile *p;
GSList *l;
if (uuid) {
@@ -1636,9 +1635,8 @@ static GSList *create_pending_list(struct btd_device *dev, const char *uuid)
for (l = dev->services; l != NULL; l = g_slist_next(l)) {
service = l->data;
- p = btd_service_get_profile(service);
- if (!p->auto_connect)
+ if (!btd_service_get_auto_connect(service))
continue;
if (g_slist_find(dev->pending, service))