From: Luiz Augusto von Dentz Date: Fri, 30 Oct 2020 00:20:11 +0000 (-0700) Subject: tools/l2cap-tester: Enable hciemu debug X-Git-Tag: submit/tizen/20220313.220938~594 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05ae08d1d77afd9c63ba9e5f0d4f5c9a192dc042;p=platform%2Fupstream%2Fbluez.git tools/l2cap-tester: Enable hciemu debug This enable hciemu debug when debug is enabled. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index 42d2b56..ff641ba 100755 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -85,7 +85,7 @@ struct l2cap_data { bool shut_sock_wr; }; -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; @@ -190,6 +190,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); + tester_print("New hciemu instance created"); } @@ -205,7 +208,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);