summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/eparser.pm16
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm
index 79158340a4..7db875af32 100644
--- a/source4/build/pidl/eparser.pm
+++ b/source4/build/pidl/eparser.pm
@@ -478,11 +478,11 @@ sub ParseStructPull($)
start_flags($struct);
- pidl "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n";
-
pidl "\titem = proto_tree_add_text(tree, ndr->tvb, ndr->offset, 0, \"$struct->{PARENT}{NAME}\");\n";
pidl "\tsubtree = proto_item_add_subtree(item, ett_$struct->{PARENT}{NAME});\n";
+ pidl "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n";
+
pidl "\tndr_pull_struct_start(ndr);\n";
if (defined $conform_e) {
@@ -518,6 +518,9 @@ sub ParseUnionPull($)
start_flags($e);
+ pidl "\titem = proto_tree_add_text(tree, ndr->tvb, ndr->offset, 0, \"$e->{PARENT}{NAME}\");\n";
+ pidl "\tsubtree = proto_item_add_subtree(item, ett_$e->{PARENT}{NAME});\n";
+
pidl "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n";
pidl "\tndr_pull_struct_start(ndr);\n";
@@ -637,6 +640,7 @@ sub ParseTypedefPull($)
}
if ($e->{DATA}->{TYPE} eq "UNION") {
+ pidl "static gint ett_$e->{NAME} = -1;\n\n";
pidl $static . "void ndr_pull_$e->{NAME}(struct e_ndr_pull *ndr, proto_tree *tree, int ndr_flags, int level)";
pidl "\n{\n";
pidl "\tproto_item *item = NULL;\n";
@@ -860,8 +864,6 @@ sub NeededTypedef($)
if ($t->{DATA}->{TYPE} eq "STRUCT") {
- print "ett_$t->{NAME}\n";
-
$needed{"ett_$t->{NAME}"} = 1;
for my $e (@{$t->{DATA}->{ELEMENTS}}) {
@@ -880,6 +882,9 @@ sub NeededTypedef($)
}
}
if ($t->{DATA}->{TYPE} eq "UNION") {
+
+ $needed{"ett_$t->{NAME}"} = 1;
+
for my $e (@{$t->{DATA}->{DATA}}) {
$e->{PARENT} = $t->{DATA};
if ($e->{TYPE} eq "UNION_ELEMENT") {
@@ -1048,9 +1053,6 @@ sub Parse($$)
pidl "\t};\n\n";
- use Data::Dumper;
- print Dumper(%needed);
-
pidl "\tstatic gint *ett[] = {\n";
pidl "\t\t&ett_dcerpc_$module,\n";
foreach my $x (keys(%needed)) {