From c533bdb7048b777789b797673a0f133a3754e30f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 12 Jun 2014 12:45:57 +0300 Subject: [PATCH] android/bluetooth: Fix not setting expected discovery type The code was not setting the expected discovery type for the next round when discovering is active. --- android/bluetooth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/bluetooth.c b/android/bluetooth.c index 9d17faa1a..bc10b38b1 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -1292,8 +1292,11 @@ static void mgmt_discovering_event(uint16_t index, uint16_t length, adapter.cur_discovery_type = type; - if (ev->discovering) + if (ev->discovering) { + adapter.exp_discovery_type = adapter.le_scanning ? + SCAN_TYPE_LE : SCAN_TYPE_NONE; return; + } /* One shot notification about discovery stopped */ if (gatt_discovery_stopped_cb) { -- 2.47.3