From 560c5a5c15ce677f0177276009d27ff13277c026 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 3 Oct 2014 14:32:30 +0300 Subject: [PATCH] tools/mgmt-tester: Fix waiting for bthost to be ready during pre-setup stage Without this it's possible we might try to enable BR/EDR SC when bthost hasn't yet established whether the underlying controller is capable of it. --- tools/mgmt-tester.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 76bef6608..aae08525e 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -109,6 +109,7 @@ static void read_info_callback(uint8_t status, uint16_t length, char addr[18]; uint16_t manufacturer; uint32_t supported_settings, current_settings; + struct bthost *bthost; tester_print("Read Info callback"); tester_print(" Status: 0x%02x", status); @@ -164,7 +165,8 @@ static void read_info_callback(uint8_t status, uint16_t length, return; } - tester_pre_setup_complete(); + bthost = hciemu_client_get_host(data->hciemu); + bthost_notify_ready(bthost, tester_pre_setup_complete); } static void index_added_callback(uint16_t index, uint16_t length, -- 2.47.3