mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-12 03:58:34 +01:00
Ticket refs #16594: TR069: GetValue of Device.DeviceInfo.ProcessStatus.ProcessNumberOfEntries is wrong
This commit is contained in:
parent
d94fbe1e88
commit
eaec0039d6
1 changed files with 6 additions and 3 deletions
|
|
@ -619,10 +619,13 @@ int get_process_cpu_usage(char* refparam, struct dmctx *ctx, void *data, char *i
|
|||
}
|
||||
|
||||
int get_process_number_of_entries(char* refparam, struct dmctx *ctx, void *data, char *instance, char **value){
|
||||
json_object *res;
|
||||
json_object *res, *processes;
|
||||
int nbre_process = 0;
|
||||
|
||||
dmubus_call("router.system", "info", UBUS_ARGS{{}}, 0, &res);
|
||||
*value = dm_ubus_get_value(res, 2, "system", "procs");
|
||||
dmubus_call("router.system", "processes", UBUS_ARGS{{}}, 0, &res);
|
||||
processes = json_object_object_get(res, "processes");
|
||||
nbre_process= json_object_array_length(processes);
|
||||
dmasprintf(value,"%d",nbre_process);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue