summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-04 21:53:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:51 -0500
commit5b9f1b01ba6880ead4662bb66988bcdf5bf2aa82 (patch)
treefdf4645a715ba931b8bd2e246fb5c7b26ee72a79 /source4
parent5d034a9d5dd79cbef89b3dc85b73296e6e63d359 (diff)
downloadsamba-5b9f1b01ba6880ead4662bb66988bcdf5bf2aa82.tar.gz
samba-5b9f1b01ba6880ead4662bb66988bcdf5bf2aa82.tar.bz2
samba-5b9f1b01ba6880ead4662bb66988bcdf5bf2aa82.zip
r19559: Fix handling of types where the name isn't prefixed by the interface name.
Based on patch by Julien Kerihuel. (This used to be commit 466e9c12a5f9bd2f7bf00c710bd9a537b48e7864)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index e211a896ad..5af7c02032 100644
--- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -256,9 +256,9 @@ sub Bitmap($$$)
register_type($name, "offset = $dissectorname(tvb, offset, pinfo, tree, drep, \@HF\@, \@PARAM\@);", "FT_UINT$size", "BASE_HEX", "0", "NULL", $size/8);
}
-sub ElementLevel($$$$$)
+sub ElementLevel($$$$$$)
{
- my ($e,$l,$hf,$myname,$pn) = @_;
+ my ($e,$l,$hf,$myname,$pn,$ifname) = @_;
my $param = 0;
@@ -327,10 +327,7 @@ sub ElementLevel($$$$$)
$call= $conformance->{types}->{$l->{DATA_TYPE}}->{DISSECTOR_NAME};
$conformance->{types}->{$l->{DATA_TYPE}}->{USED} = 1;
} else {
- if ($l->{DATA_TYPE} =~ /^([a-z]+)\_(.*)$/)
- {
- pidl_code "offset = $1_dissect_struct_$2(tvb,offset,pinfo,tree,drep,$hf,$param);";
- }
+ pidl_code "offset = $ifname\_dissect_struct_" . $l->{DATA_TYPE} . "(tvb,offset,pinfo,tree,drep,$hf,$param);";
return;
}
@@ -402,7 +399,7 @@ sub Element($$$)
pidl_code "{";
indent;
- ElementLevel($e,$_,$hf,$dissectorname.$add,$pn);
+ ElementLevel($e,$_,$hf,$dissectorname.$add,$pn,$ifname);
pidl_code "";
pidl_code "return offset;";