Diff between 6efdbd8dbd1674cb6fdaa0648f8a17f8d5240dcf and 2ab15d89c1b6fb14ee4d00b46f4489a30a6843b4

Changed Files

File Additions Deletions Status
tools/mgmt-tester.c +4 -1 modified

Full Patch

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index c5073fe..6109883 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -52,6 +52,7 @@ struct test_data {
 	uint16_t mgmt_index;
 	struct hciemu *hciemu;
 	enum hciemu_type hciemu_type;
+	bool expect_hci_command_done;
 	int unmet_conditions;
 	int unmet_setup_conditions;
 	int sk;
@@ -7021,9 +7022,11 @@ static void command_hci_callback(uint16_t opcode, const void *param,
 
 	tester_print("HCI Command 0x%04x length %u", opcode, length);
 
-	if (opcode != test->expect_hci_command || data->unmet_conditions <= 0)
+	if (opcode != test->expect_hci_command || data->expect_hci_command_done)
 		return;
 
+	data->expect_hci_command_done = true;
+
 	if (test->expect_hci_func)
 		expect_hci_param = test->expect_hci_func(&expect_hci_len);