* [PATCH BlueZ] emulator: Fix Remote Name Request Cancel command complete
@ 2013-06-05 21:04 Anderson Lizardo
2013-06-17 10:51 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Anderson Lizardo @ 2013-06-05 21:04 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
The Command Complete event for this HCI command contains two parameters,
status and bd_addr.
---
emulator/btdev.c | 6 ++++--
monitor/bt.h | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 6e00cc6..cc209db 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -874,6 +874,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
struct bt_hci_rsp_le_read_adv_tx_power lratp;
struct bt_hci_rsp_le_read_supported_states lrss;
struct bt_hci_rsp_le_read_white_list_size lrwls;
+ struct bt_hci_rsp_remote_name_request_cancel rnrc_rsp;
uint8_t status, page;
switch (opcode) {
@@ -941,8 +942,9 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
if (btdev->type == BTDEV_TYPE_LE)
goto unsupported;
rnrc = data;
- status = BT_HCI_ERR_SUCCESS;
- cmd_complete(btdev, opcode, &status, sizeof(status));
+ rnrc_rsp.status = BT_HCI_ERR_SUCCESS;
+ memcpy(rnrc_rsp.bdaddr, rnrc->bdaddr, 6);
+ cmd_complete(btdev, opcode, &rnrc_rsp, sizeof(rnrc_rsp));
name_request_complete(btdev, rnrc->bdaddr,
BT_HCI_ERR_UNKNOWN_CONN_ID);
break;
diff --git a/monitor/bt.h b/monitor/bt.h
index 7bd439f..996668f 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -167,6 +167,10 @@ struct bt_hci_cmd_remote_name_request {
struct bt_hci_cmd_remote_name_request_cancel {
uint8_t bdaddr[6];
} __attribute__ ((packed));
+struct bt_hci_rsp_remote_name_request_cancel {
+ uint8_t status;
+ uint8_t bdaddr[6];
+} __attribute__ ((packed));
#define BT_HCI_CMD_READ_REMOTE_FEATURES 0x041b
struct bt_hci_cmd_read_remote_features {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] emulator: Fix Remote Name Request Cancel command complete
2013-06-05 21:04 [PATCH BlueZ] emulator: Fix Remote Name Request Cancel command complete Anderson Lizardo
@ 2013-06-17 10:51 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2013-06-17 10:51 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
Hi Lizardo,
On Wed, Jun 05, 2013, Anderson Lizardo wrote:
> The Command Complete event for this HCI command contains two parameters,
> status and bd_addr.
> ---
> emulator/btdev.c | 6 ++++--
> monitor/bt.h | 4 ++++
> 2 files changed, 8 insertions(+), 2 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-17 10:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 21:04 [PATCH BlueZ] emulator: Fix Remote Name Request Cancel command complete Anderson Lizardo
2013-06-17 10:51 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).