Depending on the contents, instance sub-objects can be confused with
per-service data items. Fix the nesting by making an instance object
for service items.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!cs)
cs = blobmsg_open_table(&b, s->name);
+ if (!ci)
+ ci = blobmsg_open_table(&b, "*");
blobmsg_add_blob(&b, var->data);
}
+ if (ci)
+ blobmsg_close_table(&b, ci);
+
vlist_for_each_element(&s->instances, in, node) {
ci = NULL;