mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 13:14:14 +08:00
core: Fix calling adapter_auto_connect_add when connected
This call shouldn't depend on whether we're already connected or not.
This commit is contained in:
parent
5df3c149f2
commit
b99ec9df94
@ -4084,14 +4084,15 @@ static void device_set_auto_connect(struct btd_device *device, gboolean enable)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Enabling auto connect */
|
||||
adapter_auto_connect_add(device->adapter, device);
|
||||
|
||||
if (device->attrib) {
|
||||
DBG("Already connected");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Enabling auto connect */
|
||||
adapter_connect_list_add(device->adapter, device);
|
||||
adapter_auto_connect_add(device->adapter, device);
|
||||
}
|
||||
|
||||
static gboolean start_discovery(gpointer user_data)
|
||||
|
Loading…
Reference in New Issue
Block a user