From f62ee658028c9ce5886b54dc3b6e8413377766b4 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 2 Nov 2020 11:06:35 -0800 Subject: [PATCH] tools/mgmt-tester: Enable hciemu debug This enable hciemu debug when debug is enabled. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- tools/mgmt-tester.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 3b72220..27a5f0b 100755 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -57,7 +57,7 @@ struct test_data { int sk; }; -static void mgmt_debug(const char *str, void *user_data) +static void print_debug(const char *str, void *user_data) { const char *prefix = user_data; @@ -285,6 +285,9 @@ static void read_index_list_callback(uint8_t status, uint16_t length, tester_pre_setup_failed(); } + if (tester_use_debug()) + hciemu_set_debug(data->hciemu, print_debug, "hciemu: ", NULL); + if (test && test->setup_le_states) hciemu_set_master_le_states(data->hciemu, test->le_states); } @@ -311,8 +314,8 @@ static void test_pre_setup(const void *test_data) } if (tester_use_debug()) { - mgmt_set_debug(data->mgmt, mgmt_debug, "mgmt: ", NULL); - mgmt_set_debug(data->mgmt_alt, mgmt_debug, "mgmt-alt: ", NULL); + mgmt_set_debug(data->mgmt, print_debug, "mgmt: ", NULL); + mgmt_set_debug(data->mgmt_alt, print_debug, "mgmt-alt: ", NULL); } mgmt_send(data->mgmt, MGMT_OP_READ_VERSION, MGMT_INDEX_NONE, 0, NULL, -- 2.7.4