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 2e2f4130294a07243347bea90a1251ac351fb832..c22e546b945ee9e636ff6b6bf918a601694dcd31 100644 (file)
@@ -579,6 +579,14 @@ void instance_dump(struct blob_buf *b, struct service_instance *in, int verbose)
                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");