mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
device: Fix not setting initiator
This fixes not setting initiator flag properly when MGMT connect event has not been processed yet but ATT is already connected or is in progress.
This commit is contained in:
parent
4760ada065
commit
73b301372b
@ -301,7 +301,7 @@ static bool get_initiator(struct btd_device *dev)
|
||||
if (dev->bredr_state.connected)
|
||||
return dev->bredr_state.initiator;
|
||||
|
||||
return false;
|
||||
return dev->att_io ? true : false;
|
||||
}
|
||||
|
||||
static GSList *find_service_with_profile(GSList *list, struct btd_profile *p)
|
||||
@ -5368,6 +5368,9 @@ static void att_connect_cb(GIOChannel *io, GError *gerr, gpointer user_data)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Update connected state */
|
||||
device->le_state.connected = true;
|
||||
|
||||
if (!device_attach_att(device, io))
|
||||
goto done;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user