Bluetooth: Mesh: shell: Fix AppKey Add command handler

The command handler already has support for decoding from hex, however
it was not using the decoded value when calling the client API.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-12-01 13:01:18 +02:00 committed by Johan Hedberg
parent 39298cf3c5
commit dd839d90ac

View file

@ -918,10 +918,8 @@ static int cmd_app_key_add(int argc, char *argv[])
memcpy(key_val, default_key, sizeof(key_val));
}
/* TODO: decode key value that's given in hex */
err = bt_mesh_cfg_app_key_add(net.net_idx, net.dst, key_net_idx,
key_app_idx, default_key, &status);
key_app_idx, key_val, &status);
if (err) {
printk("Unable to send App Key Add (err %d)\n", err);
return 0;