From 7a81e529dc295d9da5980a88257bf903f321519a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 3 Sep 2005 01:50:56 +0000 Subject: r9982: Strip prefixes off the check for noemit in the conformance info so you can use the typedef names in the IDL rather than the autogenerated function names. This means you can say "NOEMIT security_descriptor" instead of "NOEMIT dissect_security_descriptor_type" or whatever. (This used to be commit ec80c5ceec3c96dc847d171967472cce99edcdc7) --- source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/pidl/lib') diff --git a/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm b/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm index ad466b246a..a0e8f4126b 100644 --- a/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm @@ -117,7 +117,7 @@ sub Enum($$$) my $valsstring = "$ifname\_$name\_vals"; my $dissectorname = "$ifname\_dissect\_enum\_".StripPrefixes($name); - return if (defined($conformance->{noemit}->{$dissectorname})); + return if (defined($conformance->{noemit}->{StripPrefixes($name)})); foreach (@{$e->{ELEMENTS}}) { if (/([^=]*)=(.*)/) { @@ -319,7 +319,8 @@ sub Element($$$) my $hf = register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", field2name($e->{NAME}), "$ifname.$pn.$e->{NAME}", type2ft($e->{TYPE}), "BASE_HEX", "NULL", 0, ""); - if (defined($conformance->{noemit}->{$dissectorname})) { + my $eltname = StripPrefixes($pn) . ".$e->{NAME}"; + if (defined($conformance->{noemit}->{$eltname})) { return $call_code; } @@ -404,7 +405,7 @@ sub Struct($$$) my ($e,$name,$ifname) = @_; my $dissectorname = "$ifname\_dissect\_struct\_".StripPrefixes($name); - return if (defined($conformance->{noemit}->{$dissectorname})); + return if (defined($conformance->{noemit}->{StripPrefixes($name)})); register_ett("ett_$ifname\_$name"); @@ -451,7 +452,8 @@ sub Union($$$) my ($e,$name,$ifname) = @_; my $dissectorname = "$ifname\_dissect_".StripPrefixes($name); - return if (defined($conformance->{noemit}->{$dissectorname})); + + return if (defined($conformance->{noemit}->{StripPrefixes($name)})); register_ett("ett_$ifname\_$name"); -- cgit