Diff between 9ca7edc30c456260ce6ec91ff9d4f1c7c628eaf7 and a103d401ee0a31428ef3ba7f9a591ef05f1c8d11

Changed Files

File Additions Deletions Status
src/adapter.c +1 -24 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 83ec0bc..85da7a5 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -4264,36 +4264,13 @@ static void read_index_list_complete(uint8_t status, uint16_t length,
 	}
 
 	for (i = 0; i < num; i++) {
-		struct btd_adapter *adapter;
 		uint16_t index;
 
 		index = btohs(rp->index[i]);
 
 		DBG("Found index %u", index);
 
-		adapter = adapter_find_by_id(index);
-		if (adapter != NULL) {
-			warn("Ignoring index for an already existing adapter");
-			continue;
-		}
-
-		adapter = adapter_create(index);
-		if (!adapter) {
-			error("Unable to create new adapter for index %u",
-									index);
-			continue;
-		}
-
-		DBG("sending read info command for index %u", index);
-
-		if (mgmt_send(mgmt_master, MGMT_OP_READ_INFO, index, 0, NULL,
-						read_info_complete,
-						adapter, adapter_destroy) > 0)
-			continue;
-
-		error("Failed to read controller info for index %u", index);
-
-		adapter_destroy(adapter);
+		index_added(index, 0, NULL, NULL);
 	}
 }