OSDN Git Service

android: Fix not storing adapter index in index added event
authorSzymon Janc <szymon.janc@tieto.com>
Fri, 15 Nov 2013 12:16:47 +0000 (13:16 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 15 Nov 2013 12:44:10 +0000 (14:44 +0200)
If controller was addded after daemon start its index was not stored
resulting in mgmt commands to be always send to MGMT_INDEX_NONE index.

android/bluetooth.c

index 39589fa..b7c05e7 100644 (file)
@@ -1356,6 +1356,8 @@ static void mgmt_index_added_event(uint16_t index, uint16_t length,
                return;
        }
 
+       adapter.index = index;
+
        if (mgmt_send(mgmt_if, MGMT_OP_READ_INFO, index, 0, NULL,
                                read_info_complete, cb, NULL) == 0) {
                cb(-EIO, NULL);