add .data to instance_dump()
authorJohn Crispin <blogic@openwrt.org>
Wed, 27 Aug 2014 11:50:24 +0000 (13:50 +0200)
committerJohn Crispin <blogic@openwrt.org>
Fri, 29 Aug 2014 14:14:57 +0000 (16:14 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
service/instance.c

index 2e2f413..c22e546 100644 (file)
@@ -579,6 +579,14 @@ void instance_dump(struct blob_buf *b, struct service_instance *in, int verbose)
                blobmsg_close_table(b, e);
        }
 
                blobmsg_close_table(b, e);
        }
 
+       if (!avl_is_empty(&in->data.avl)) {
+               struct blobmsg_list_node *var;
+               void *e = blobmsg_open_table(b, "data");
+               blobmsg_list_for_each(&in->data, var)
+                       blobmsg_add_blob(b, var->data);
+               blobmsg_close_table(b, e);
+       }
+
        if (!avl_is_empty(&in->limits.avl)) {
                struct blobmsg_list_node *var;
                void *e = blobmsg_open_table(b, "limits");
        if (!avl_is_empty(&in->limits.avl)) {
                struct blobmsg_list_node *var;
                void *e = blobmsg_open_table(b, "limits");