aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/emulator
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2023-08-05 15:29:06 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-08-07 16:19:48 -0700
commit459b095c663c5fd7dfdd00bcefe178bbf21c38f5 (patch)
tree09de5fd3873436245af7a99c6e93ae81e3f4d84e /emulator
parent59569c1f947d648f1e0b9234dad3707f6c34739b (diff)
btdev: fix CIG ID on Set CIG Parameters error response
Set CIG Parameters shall return correct CIG ID in Command_Complete also when it errors.
Diffstat (limited to 'emulator')
-rw-r--r--emulator/btdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 38dcb189e1..58414bd744 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5872,6 +5872,8 @@ static int cmd_set_cig_params(struct btdev *dev, const void *data,
memset(&rsp, 0, sizeof(rsp));
+ rsp.params.cig_id = cmd->cig_id;
+
if (cmd->num_cis > ARRAY_SIZE(dev->le_cig[0].cis)) {
rsp.params.status = BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;
goto done;
@@ -5942,7 +5944,6 @@ static int cmd_set_cig_params(struct btdev *dev, const void *data,
}
rsp.params.status = BT_HCI_ERR_SUCCESS;
- rsp.params.cig_id = cmd->cig_id;
for (i = 0; i < cmd->num_cis; i++) {
rsp.params.num_handles++;