summaryrefslogtreecommitdiff
path: root/tools/bnep-tester.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-11-02 11:07:19 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-11-02 11:10:53 -0800
commitac9f2ad9eb4c522c33c8dcd1941d28fd04c6598a (patch)
tree323b163cc132281c903af462d98f64f4366220fb /tools/bnep-tester.c
parent4ddc7118d86832a7b983b6c0059786febc3a488e (diff)
downloadbluez-ac9f2ad9eb4c522c33c8dcd1941d28fd04c6598a.tar.gz
tools/bnep-tester: Enable hciemu debug
This enable hciemu debug when debug is enabled.
Diffstat (limited to 'tools/bnep-tester.c')
-rw-r--r--tools/bnep-tester.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/bnep-tester.c b/tools/bnep-tester.c
index dfeb0ed0b..5e4d7fb6d 100644
--- a/tools/bnep-tester.c
+++ b/tools/bnep-tester.c
@@ -59,7 +59,7 @@ struct rfcomm_server_data {
uint16_t data_len;
};
-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;
@@ -164,6 +164,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");
}
@@ -179,7 +182,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);