From 6c3872af926f50f6d70b2e031cb11de95cc8a815 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 26 Jan 2016 22:58:47 +0200 Subject: [PATCH] tools/btmgmt: Fix canceling pairing Pairing cancellation needs to be sent with mgmt_reply() rather than mgmt_send() since otherwise the mgmt library will not send the command until the response to the original Pair Device command has been received. --- tools/btmgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 3d03455fa..4c86dcb0d 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -2592,7 +2592,7 @@ static void cmd_cancel_pair(struct mgmt *mgmt, uint16_t index, int argc, str2ba(argv[0], &cp.bdaddr); cp.type = type; - if (mgmt_send(mgmt, MGMT_OP_CANCEL_PAIR_DEVICE, index, sizeof(cp), &cp, + if (mgmt_reply(mgmt, MGMT_OP_CANCEL_PAIR_DEVICE, index, sizeof(cp), &cp, cancel_pair_rsp, NULL, NULL) == 0) { error("Unable to send cancel_pair_device cmd"); return noninteractive_quit(EXIT_FAILURE); -- 2.47.3