Added password input at mesh_test app
authorsaerome.kim <saerome.kim@samsung.com>
Fri, 30 Jun 2017 04:28:26 +0000 (13:28 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 17 Jul 2017 02:09:10 +0000 (11:09 +0900)
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
test/mesh_network.c

index 4aafe36..866e389 100644 (file)
@@ -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, },
 };