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.
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
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)
goto done;
}
+ /* Update connected state */
+ device->le_state.connected = true;
+
if (!device_attach_att(device, io))
goto done;