android/gatt: Restart scan after connection

With this patch we make sure that scan is restarted if it was holded for
connection purpose.
This commit is contained in:
Lukasz Rymanowski 2014-03-23 21:20:09 +01:00 committed by Szymon Janc
parent 0a783f1163
commit 914c394e50

View File

@ -481,6 +481,12 @@ reply:
/* If connection did not succeed, destroy device */ /* If connection did not succeed, destroy device */
if (status) if (status)
destroy_device(dev); destroy_device(dev);
/* Check if we should restart scan */
if (scanning)
bt_le_discovery_start(le_device_found_handler);
/*FIXME: What to do if discovery won't start here. */
} }
static int connect_le(struct gatt_device *dev) static int connect_le(struct gatt_device *dev)