mesh: Make mesh config model binding API consistent
authorInga Stotland <inga.stotland@intel.com>
Wed, 12 Aug 2020 19:03:17 +0000 (12:03 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
This changes the order of function arguments in
mesh_config_model_binding_add() and mesh_config_model_binding_del()
to make them consistent with the rest of mesh_config_model... APIs

Change-Id: I5fcb97c5288d277b28c9ee7da807080f16d50ba9
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
mesh/mesh-config-json.c
mesh/mesh-config.h
mesh/model.c

index 75ffa65..0882a91 100644 (file)
@@ -838,7 +838,7 @@ bool mesh_config_app_key_del(struct mesh_config *cfg, uint16_t net_idx,
 }
 
 bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr,
-                                               bool vendor, uint32_t mod_id,
+                                               uint32_t mod_id, bool vendor,
                                                        uint16_t app_idx)
 {
        json_object *jnode, *jmodel, *jstring, *jarray = NULL;
@@ -883,7 +883,7 @@ bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr,
 }
 
 bool mesh_config_model_binding_del(struct mesh_config *cfg, uint16_t ele_addr,
-                                               bool vendor, uint32_t mod_id,
+                                               uint32_t mod_id, bool vendor,
                                                        uint16_t app_idx)
 {
        json_object *jnode, *jmodel, *jarray;
index f15f3f3..50a55d5 100644 (file)
@@ -152,10 +152,10 @@ bool mesh_config_comp_page_add(struct mesh_config *cfg, uint8_t page,
                                                uint8_t *data, uint16_t size);
 bool mesh_config_comp_page_mv(struct mesh_config *cfg, uint8_t old, uint8_t nw);
 bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr,
-                                               bool vendor, uint32_t mod_id,
+                                               uint32_t mod_id, bool vendor,
                                                        uint16_t app_idx);
 bool mesh_config_model_binding_del(struct mesh_config *cfg, uint16_t ele_addr,
-                                               bool vendor, uint32_t mod_id,
+                                               uint32_t mod_id, bool vendor,
                                                        uint16_t app_idx);
 bool mesh_config_model_pub_add(struct mesh_config *cfg, uint16_t ele_addr,
                                                uint32_t mod_id, bool vendor,
index 136edb1..961391f 100644 (file)
@@ -659,7 +659,7 @@ static int update_binding(struct mesh_node *node, uint16_t addr, uint32_t id,
                model_unbind_idx(node, ele_idx, mod, app_idx);
 
                if (!mesh_config_model_binding_del(node_config_get(node),
-                                                       addr, vendor, id,
+                                                       addr, id, vendor,
                                                                app_idx))
                        return MESH_STATUS_STORAGE_FAIL;
 
@@ -671,7 +671,7 @@ static int update_binding(struct mesh_node *node, uint16_t addr, uint32_t id,
                return MESH_STATUS_INSUFF_RESOURCES;
 
        if (!mesh_config_model_binding_add(node_config_get(node), addr,
-                                               vendor, id, app_idx))
+                                                       id, vendor, app_idx))
                return MESH_STATUS_STORAGE_FAIL;
 
        model_bind_idx(node, ele_idx, mod, app_idx);