diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 0618de1..4c393ce 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
}
static int mgmt_confirm_reply(struct mgmt *mgmt, uint16_t index,
- const bdaddr_t *bdaddr)
+ const struct mgmt_addr_info *addr)
{
struct mgmt_cp_user_confirm_reply cp;
memset(&cp, 0, sizeof(cp));
- bacpy(&cp.addr.bdaddr, bdaddr);
+ memcpy(&cp.addr, addr, sizeof(*addr));
return mgmt_reply(mgmt, MGMT_OP_USER_CONFIRM_REPLY, index,
sizeof(cp), &cp, confirm_rsp, NULL, NULL);
}
static int mgmt_confirm_neg_reply(struct mgmt *mgmt, uint16_t index,
- const bdaddr_t *bdaddr)
+ const struct mgmt_addr_info *addr)
{
struct mgmt_cp_user_confirm_reply cp;
memset(&cp, 0, sizeof(cp));
- bacpy(&cp.addr.bdaddr, bdaddr);
+ memcpy(&cp.addr, addr, sizeof(*addr));
return mgmt_reply(mgmt, MGMT_OP_USER_CONFIRM_NEG_REPLY, index,
sizeof(cp), &cp, confirm_neg_rsp, NULL, NULL);
memset(rsp, 0, sizeof(rsp));
if (fgets(rsp, sizeof(rsp), stdin) == NULL || rsp[0] == '\n') {
- mgmt_confirm_neg_reply(mgmt, index, &ev->addr.bdaddr);
+ mgmt_confirm_neg_reply(mgmt, index, &ev->addr);
return;
}
rsp[rsp_len - 1] = '\0';
if (rsp[0] == 'y' || rsp[0] == 'Y')
- mgmt_confirm_reply(mgmt, index, &ev->addr.bdaddr);
+ mgmt_confirm_reply(mgmt, index, &ev->addr);
else
- mgmt_confirm_neg_reply(mgmt, index, &ev->addr.bdaddr);
+ mgmt_confirm_neg_reply(mgmt, index, &ev->addr);
}
static void cmd_monitor(struct mgmt *mgmt, uint16_t index, int argc,