Ticket refs #16151: TR-069: GetValue wrongly of the parameter Device.DeviceInfo.X_Inteno_SE_MemoryBank

This commit is contained in:
Omar Kallel 2019-01-15 15:07:09 +01:00
parent df70603a9a
commit f5b8d22619

View file

@ -96,10 +96,18 @@ int dmubus_call_set(char *obj, char *method, struct ubus_arg u_args[], int u_arg
sprintf(p, "{");
for (i = 0; i < u_args_size; i++) {
p += strlen(p);
if (i == 0)
sprintf(p, "\"%s\": \"%s\"", u_args[i].key, u_args[i].val);
else
sprintf(p, ", \"%s\": \"%s\"", u_args[i].key, u_args[i].val);
if (i == 0){
if(u_args[i].type != Integer)
sprintf(p, "\"%s\": \"%s\"", u_args[i].key, u_args[i].val);
else
sprintf(p, "\"%s\": %s", u_args[i].key, u_args[i].val);
}
else{
if(u_args[i].type != Integer)
sprintf(p, ", \"%s\": \"%s\"", u_args[i].key, u_args[i].val);
else
sprintf(p, ", \"%s\": %s", u_args[i].key, u_args[i].val);
}
}
p += strlen(p);
sprintf(p, "}");