OSDN Git Service

android/bluetooth: Fix not setting expected discovery type
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 12 Jun 2014 09:45:57 +0000 (12:45 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 13 Jun 2014 12:47:34 +0000 (15:47 +0300)
The code was not setting the expected discovery type for the next round
when discovering is active.

android/bluetooth.c

index 9d17faa..bc10b38 100644 (file)
@@ -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) {