From 914c394e50cfa564eee782ce450004609c6a955f Mon Sep 17 00:00:00 2001 From: Lukasz Rymanowski Date: Sun, 23 Mar 2014 21:20:09 +0100 Subject: [PATCH] android/gatt: Restart scan after connection With this patch we make sure that scan is restarted if it was holded for connection purpose. --- android/gatt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index ee9eb901a..813588bbc 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -481,6 +481,12 @@ reply: /* If connection did not succeed, destroy device */ if (status) 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) -- 2.47.3