mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
HF-7178 - dmdynamicjson ubus get value failed
(cherry picked from commit 3209cb83a5)
This commit is contained in:
parent
07f34f9b9b
commit
e70098b866
1 changed files with 4 additions and 0 deletions
|
|
@ -789,6 +789,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