From 9233f48d51b99a6b5447ae0d5884851f3cfd7402 Mon Sep 17 00:00:00 2001 From: "saerome.kim" Date: Fri, 30 Jun 2017 13:28:26 +0900 Subject: [PATCH] Added password input at mesh_test app Signed-off-by: saerome.kim --- test/mesh_network.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/mesh_network.c b/test/mesh_network.c index 4aafe36..866e389 100644 --- a/test/mesh_network.c +++ b/test/mesh_network.c @@ -433,7 +433,8 @@ static int run_create_network(MManager *mm, struct menu_data *menu) security = ((1 == ret) ? MESH_SECURITY_SAE : MESH_SECURITY_NONE); } - mesh_network_new_with(&net, meshid, NULL, _mesh_channel, 0, 0, security, NULL); + mesh_network_new_with(&net, meshid, NULL, _mesh_channel, 0, 0, + security, security == MESH_SECURITY_SAE ? mesh_passphrase : NULL); ret = mesh_create_mesh_network(mesh, net); mesh_network_destroy(net); if (MESH_ERROR_NONE != ret) { @@ -629,7 +630,8 @@ static struct menu_data menu_create_network[] = { { "1", "Mesh ID", NULL, NULL, meshid }, { "2", "Channel", NULL, NULL, mesh_channel }, { "3", "Security (0=None,1=SAE)", NULL, NULL, mesh_security }, - { "4", "Run", NULL, run_create_network, NULL }, + { "4", "Passphrase", NULL, NULL, mesh_passphrase }, + { "5", "Run", NULL, run_create_network, NULL }, { NULL, NULL, }, }; -- 2.7.4