Add a parameter to call dbus method create_mesh_network 89/186689/1
authorAbhishek Sansanwal <abhishek.s94@samsung.com>
Mon, 13 Aug 2018 11:15:20 +0000 (16:45 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Mon, 13 Aug 2018 11:28:26 +0000 (16:58 +0530)
Description: Additional parameter was added to the
dbus method "create_mesh_network" in the commit
48d7d1c3. This resulted in the dbus call failing.
Add this additional parameter while calling the
dbus method.

Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: Ie9feb592fd986d963e802c85e9e1f3d2bfd6dc46

unittest/unittest.cpp
unittest/wmesh.cpp
unittest/wmesh.h

index 3f43338..e9276ca 100644 (file)
@@ -197,7 +197,7 @@ TEST(WifiMeshManager, CreateMeshNetwork_p)
        error_e ret = ERROR_NONE;
        Wmesh w;
 
-       ret = w.CreateMeshNetwork(mesh_id, 1, 2);
+       ret = w.CreateMeshNetwork(mesh_id, 1, 2, 1);
        EXPECT_EQ(ERROR_NONE, ret);
 }
 
index 0e01381..2152972 100644 (file)
@@ -400,7 +400,8 @@ error_e Wmesh::IsSoftapEnabled(void)
 
        return ERROR_NONE;
 }
-error_e Wmesh::CreateMeshNetwork(char *mesh_id, int channel, int security)
+error_e Wmesh::CreateMeshNetwork(char *mesh_id, int channel, int security,
+               int pmf)
 {
        GVariant *message = NULL;
        error_e error = ERROR_NONE;
@@ -409,7 +410,7 @@ error_e Wmesh::CreateMeshNetwork(char *mesh_id, int channel, int security)
                WIFI_MESH_MGR_PATH,
                WIFI_MESH_MGR_INTERFACE,
                WIFI_MESH_MGR_METHOD_CREATE_MESH_NETWORK,
-               g_variant_new("(sii)", mesh_id, channel, security),
+               g_variant_new("(siii)", mesh_id, channel, security, pmf),
                &error);
 
        if (message == NULL) {
index 9317fe4..13f99b5 100644 (file)
@@ -41,7 +41,8 @@ public:
        error_e EnableSoftap(void);
        error_e DisableSoftap(void);
        error_e IsSoftapEnabled(void);
-       error_e CreateMeshNetwork(char *mesh_id, int channel, int security);
+       error_e CreateMeshNetwork(char *mesh_id, int channel, int security,
+                       int pmf);
        error_e ConnectMeshNetwork(char *mesh_id, int channel, int security,
                        char *passphrase);
        error_e DisconnectMeshNetwork(char *mesh_id, int channel, int security);