From 013b689f919d7c778b300d136fded5548b6053f1 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 16 Jul 2004 12:59:16 +0000 Subject: r1535: Create a subtree for each array element. (This used to be commit 4099e10d435436c092ca0e512fd4ddafdf4ae6a5) --- source4/build/pidl/packet-dcerpc-eparser.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/source4/build/pidl/packet-dcerpc-eparser.c b/source4/build/pidl/packet-dcerpc-eparser.c index 4762ac9278..8debaf0aab 100644 --- a/source4/build/pidl/packet-dcerpc-eparser.c +++ b/source4/build/pidl/packet-dcerpc-eparser.c @@ -13,6 +13,8 @@ static int hf_string4_offset = -1; static int hf_string4_len2 = -1; static int hf_string_data = -1; +static gint ett_array = -1; + /* Create a ndr_pull structure from data stored in a tvb at a given offset. */ struct e_ndr_pull *ndr_pull_init(tvbuff_t *tvb, int offset, packet_info *pinfo, @@ -523,17 +525,25 @@ void ndr_pull_array(struct e_ndr_pull *ndr, proto_tree *tree, int ndr_flags, proto_tree *tree, int ndr_flags)) { + proto_tree **subtrees; int i; + + subtrees = (proto_tree **)g_malloc(sizeof(proto_tree **) * count); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; for (i=0;itvb, ndr->offset, 0, "Array entry"); + subtrees[i] = proto_item_add_subtree(item, ett_array); + pull_fn(ndr, subtrees[i], NDR_SCALARS); } if (!(ndr_flags & NDR_BUFFERS)) goto done; buffers: for (i=0;i