[PATCH] android: Fix not storing adapter index in index added event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 39589fa..b7c05e7 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);
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux