From: Inga Stotland Date: Wed, 12 Aug 2020 19:03:17 +0000 (-0700) Subject: mesh: Make mesh config model binding API consistent X-Git-Tag: accepted/tizen/unified/20210128.132355~2^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39fc3547b8699f8b87f17eccd39d5b7b4a0ac289;p=platform%2Fupstream%2Fbluez.git mesh: Make mesh config model binding API consistent 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 --- diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c index 75ffa65..0882a91 100644 --- a/mesh/mesh-config-json.c +++ b/mesh/mesh-config-json.c @@ -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; diff --git a/mesh/mesh-config.h b/mesh/mesh-config.h index f15f3f3..50a55d5 100644 --- a/mesh/mesh-config.h +++ b/mesh/mesh-config.h @@ -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, diff --git a/mesh/model.c b/mesh/model.c index 136edb1..961391f 100644 --- a/mesh/model.c +++ b/mesh/model.c @@ -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);