From bfae9f10f4c6e0e3bf71d13c9e1761080725ba6e Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 2 Nov 2020 11:08:39 -0800 Subject: [PATCH] tools/sco-tester: Enable hciemu debug This enable hciemu debug when debug is enabled. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- tools/sco-tester.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/sco-tester.c b/tools/sco-tester.c index 471f894..2b8dc0d 100755 --- a/tools/sco-tester.c +++ b/tools/sco-tester.c @@ -44,7 +44,7 @@ struct sco_client_data { int expect_err; }; -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; @@ -150,6 +150,9 @@ static void read_index_list_callback(uint8_t status, uint16_t length, return; } + if (tester_use_debug()) + hciemu_set_debug(data->hciemu, print_debug, "hciemu: ", NULL); + tester_print("New hciemu instance created"); if (data->disable_esco) { @@ -175,7 +178,7 @@ 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, print_debug, "mgmt: ", NULL); mgmt_send(data->mgmt, MGMT_OP_READ_INDEX_LIST, MGMT_INDEX_NONE, 0, NULL, read_index_list_callback, NULL, NULL); -- 2.7.4