From e30125fa921bc1d2c27ea47f79318ee90bbe54d5 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 15 Nov 2013 13:16:47 +0100 Subject: [PATCH] android: Fix not storing adapter index in index added event 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/bluetooth.c b/android/bluetooth.c index 39589fa11..b7c05e774 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -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); -- 2.11.0