diff options
author | Tim Potter <tpot@samba.org> | 2004-06-16 05:03:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:42 -0500 |
commit | eca6982a951b7f7051d6386a58cf35caedc84f3b (patch) | |
tree | cf386d62a3a9ba1cc6a123d2ba6f0068ef8edefd /source4/build/pidl/eparser.pm | |
parent | e8524d731a91d52f8cf426d96f71239babbd1dd7 (diff) | |
download | samba-eca6982a951b7f7051d6386a58cf35caedc84f3b.tar.gz samba-eca6982a951b7f7051d6386a58cf35caedc84f3b.tar.bz2 samba-eca6982a951b7f7051d6386a58cf35caedc84f3b.zip |
r1164: Whoops - remove debugging printfs and Data::Dumper reference.
Give unions their own subtree as well as structures.
(This used to be commit d3183d781ed62de756840c85742ae4f887c45251)
Diffstat (limited to 'source4/build/pidl/eparser.pm')
-rw-r--r-- | source4/build/pidl/eparser.pm | 16 |
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)) { |