Bluetooth: Mesh: Fix cfg_cli KRP not working for key_net_idx != 0

Initializes the `net_idx` field of the ack context properly for KRP
functions in the Config Client.

This fixes a problem where `bt_mesh_cfg_cli_krp_get` and
`bt_mesh_cfg_cli_krp_set` would always fail the ack ctx comparison if
`key_net_idx` was != 0.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This commit is contained in:
Ludvig Jordet 2024-11-27 13:09:56 +01:00 committed by Benjamin Cabé
commit 88f62a1a5e

View file

@ -1187,6 +1187,7 @@ int bt_mesh_cfg_cli_krp_get(uint16_t net_idx, uint16_t addr, uint16_t key_net_id
struct krp_param param = {
.status = status,
.phase = phase,
.net_idx = key_net_idx,
};
const struct bt_mesh_msg_rsp_ctx rsp = {
.ack = &cli->ack_ctx,
@ -1209,6 +1210,7 @@ int bt_mesh_cfg_cli_krp_set(uint16_t net_idx, uint16_t addr, uint16_t key_net_id
struct krp_param param = {
.status = status,
.phase = phase,
.net_idx = key_net_idx,
};
const struct bt_mesh_msg_rsp_ctx rsp = {
.ack = &cli->ack_ctx,