Skip to content

Commit

Permalink
tests: Bluetooth: Mesh: fix On-Demand API usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
alxelax committed Nov 6, 2023
1 parent 0b55758 commit 1063bdd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions subsys/bluetooth/mesh/shell/od_priv_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ static int cmd_od_priv_gatt_proxy_set(const struct shell *sh, size_t argc,
char *argv[])
{
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;

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) {
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 {
val = shell_strtoul(argv[1], 0, &err);

Expand All @@ -30,7 +29,7 @@ static int cmd_od_priv_gatt_proxy_set(const struct shell *sh, size_t argc,
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) {
Expand Down

0 comments on commit 1063bdd

Please sign in to comment.