blobmsg-example: fix length handling in dump_table() calls
authorFelix Fietkau <nbd@openwrt.org>
Wed, 11 Sep 2013 15:59:33 +0000 (17:59 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 11 Sep 2013 15:59:33 +0000 (17:59 +0200)
examples/blobmsg-example.c

index 2c2e703f09c0b564d5ddecdeea53cbc44464aec2..5d0a8d069a65ad9919a33246f86a277d6de8dfbf 100644 (file)
@@ -95,11 +95,11 @@ static void dump_message(struct blob_buf *buf)
 
        if (tb[FOO_LIST]) {
                fprintf(stderr, "List: ");
 
        if (tb[FOO_LIST]) {
                fprintf(stderr, "List: ");
-               dump_table(blobmsg_data(tb[FOO_LIST]), blob_len(tb[FOO_LIST]), 0, true);
+               dump_table(blobmsg_data(tb[FOO_LIST]), blobmsg_data_len(tb[FOO_LIST]), 0, true);
        }
        if (tb[FOO_TESTDATA]) {
                fprintf(stderr, "Testdata: ");
        }
        if (tb[FOO_TESTDATA]) {
                fprintf(stderr, "Testdata: ");
-               dump_table(blobmsg_data(tb[FOO_TESTDATA]), blob_len(tb[FOO_TESTDATA]), 0, false);
+               dump_table(blobmsg_data(tb[FOO_TESTDATA]), blobmsg_data_len(tb[FOO_TESTDATA]), 0, false);
        }
 }
 
        }
 }