mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
HF-7178 - dmdynamicjson ubus get value failed
This commit is contained in:
parent
248a8e2053
commit
3209cb83a5
1 changed files with 4 additions and 0 deletions
|
|
@ -796,6 +796,10 @@ static char *ubus_get_value(json_object *mapping_obj, int json_version, char *re
|
|||
if (data && is_array) {
|
||||
char *arguments = (json_version == JSON_VERSION_1) ? is_array + sizeof("[@index]") : is_array + sizeof("[@i-1]");
|
||||
json_obj = get_requested_json_obj((json_object *)data, instance, arguments, key_name, sizeof(key_name));
|
||||
/* If the json object is already extracted from array object then use that object
|
||||
to extract the value */
|
||||
if (!json_obj && data)
|
||||
json_obj = (json_object*)data;
|
||||
} else {
|
||||
json_obj = get_requested_json_obj(res, instance, key_buf, key_name, sizeof(key_name));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue