Bluetooth: Mesh: fix On-Demand API usage

On-Demand proxy client API has been changed but
usage of this API in shell test was missed.
Commit fixes this API usage.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
Aleksandr Khromykh 2023-11-06 13:40:55 +01:00 committed by Carles Cufí
commit b6f20d67c2

View file

@ -15,13 +15,12 @@ static int cmd_od_priv_gatt_proxy_set(const struct shell *sh, size_t argc,
char *argv[]) char *argv[])
{ {
uint8_t val, val_rsp; uint8_t val, val_rsp;
uint16_t net_idx = bt_mesh_shell_target_ctx.net_idx;
uint16_t addr = bt_mesh_shell_target_ctx.dst;
int err = 0; int err = 0;
struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(bt_mesh_shell_target_ctx.net_idx,
bt_mesh_shell_target_ctx.dst);
if (argc < 2) { if (argc < 2) {
err = bt_mesh_od_priv_proxy_cli_get(&ctx, &val_rsp); err = bt_mesh_od_priv_proxy_cli_get(net_idx, addr, &val_rsp);
} else { } else {
val = shell_strtoul(argv[1], 0, &err); val = shell_strtoul(argv[1], 0, &err);
@ -30,7 +29,7 @@ static int cmd_od_priv_gatt_proxy_set(const struct shell *sh, size_t argc,
return err; return err;
} }
err = bt_mesh_od_priv_proxy_cli_set(&ctx, val, &val_rsp); err = bt_mesh_od_priv_proxy_cli_set(net_idx, addr, val, &val_rsp);
} }
if (err) { if (err) {