summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Ethereal
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-09-03 01:50:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:26 -0500
commit7a81e529dc295d9da5980a88257bf903f321519a (patch)
tree8c97d67c86e21227eee6860878436fcb2db58738 /source4/pidl/lib/Parse/Pidl/Ethereal
parent5d2d627cde56af4408d3379c4e33c815ebeea124 (diff)
downloadsamba-7a81e529dc295d9da5980a88257bf903f321519a.tar.gz
samba-7a81e529dc295d9da5980a88257bf903f321519a.tar.bz2
samba-7a81e529dc295d9da5980a88257bf903f321519a.zip
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)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Ethereal')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm10
1 files changed, 6 insertions, 4 deletions
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");