From e04feacfb3246218fb2d1e35a05cf0bddf5c854f Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 8 Dec 2014 15:18:21 +0200 Subject: [PATCH] mgmt-tester: Prefer mgmt_send_nowait over sync_write --- tools/mgmt-tester.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index f79f87ef3..c54ee1a5c 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -4313,11 +4313,9 @@ static void test_command_generic(const void *test_data) send_param = test->send_func(&send_len); if (test->force_power_off) { - mgmt_set_sync_write(data->mgmt, true); - mgmt_reply(data->mgmt, test->send_opcode, index, send_len, - send_param, command_generic_callback, - NULL, NULL); - mgmt_set_sync_write(data->mgmt, false); + mgmt_send_nowait(data->mgmt, test->send_opcode, index, + send_len, send_param, + command_generic_callback, NULL, NULL); power_off(data->mgmt_index); } else { mgmt_send(data->mgmt, test->send_opcode, index, send_len, @@ -4392,11 +4390,9 @@ static void connected_event(uint16_t index, uint16_t length, const void *param, send_param = test->send_func(&send_len); if (test->force_power_off) { - mgmt_set_sync_write(data->mgmt, true); - mgmt_reply(data->mgmt, test->send_opcode, index, send_len, - send_param, command_generic_callback, - NULL, NULL); - mgmt_set_sync_write(data->mgmt, false); + mgmt_send_nowait(data->mgmt, test->send_opcode, index, + send_len, send_param, + command_generic_callback, NULL, NULL); power_off(data->mgmt_index); } else { mgmt_send(data->mgmt, test->send_opcode, index, send_len, -- 2.47.3