summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2014-09-23 01:28:40 -0700
committerStefan Metzmacher <metze@samba.org>2014-10-09 22:06:46 +0200
commit343db5326b369cbdef4b723e3056acc2a866a887 (patch)
treef08fca531a82e03a021bf1a5a11bf194c866968e /pidl
parent5740a06b320d56840439fb7fe3b8b27f341ddaa7 (diff)
downloadsamba-343db5326b369cbdef4b723e3056acc2a866a887.tar.gz
pidl-wireshark: Handle the case when the DATA_TYPE is not a simple type
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Change-Id: If78f241333c1372c60c7d00211c1e6aeb22c9719 Signed-off-by: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Wireshark/NDR.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 5cfcf5cdc8d..d9abe6a6d47 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -348,7 +348,14 @@ sub ElementLevel($$$$$$$$)
$call= $self->{conformance}->{types}->{$l->{DATA_TYPE}}->{DISSECTOR_NAME};
$self->{conformance}->{types}->{$l->{DATA_TYPE}}->{USED} = 1;
} else {
- $self->pidl_code("offset = $ifname\_dissect_struct_" . $l->{DATA_TYPE} . "(tvb,offset,pinfo,tree,drep,$hf,$param);");
+ my $t;
+ if (ref($l->{DATA_TYPE}) eq "HASH" ) {
+ $t = "$l->{DATA_TYPE}->{TYPE}_$l->{DATA_TYPE}->{NAME}";
+ } else {
+ $t = $l->{DATA_TYPE};
+ }
+
+ $self->pidl_code("offset = $ifname\_dissect_struct_" . $t . "(tvb,offset,pinfo,tree,drep,$hf,$param);");
return;
}