B#12370: wildcard searched not working with micro-service datamodel

This commit is contained in:
Amin Ben Romdhane 2023-10-24 15:38:47 +02:00
parent 9d93c075af
commit 6cfbb2f966

View file

@ -1221,6 +1221,11 @@ static int get_ubus_instances(struct dmctx *dmctx, struct dmnode *node)
size_t nbre_obj = json_object_array_length(res_array);
if (nbre_obj == 0) {
dmctx->findparam = 1;
return 0;
}
for (size_t i = 0; i < nbre_obj; i++) {
res_obj = json_object_array_get_idx(res_array, i);
@ -1228,6 +1233,8 @@ static int get_ubus_instances(struct dmctx *dmctx, struct dmnode *node)
if (DM_STRLEN(fault))
return DM_STRTOUL(fault);
dmctx->findparam = 1;
char *path = dmjson_get_value(res_obj, 1, "path");
add_list_parameter(dmctx, dmstrdup(path), NULL, "xsd:object", NULL);