aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-03 11:30:26 -0800
committerGuy Harris <guy@alum.mit.edu>2014-11-03 19:30:53 +0000
commite0c727739e06571b5b7d64cd2bfb0edc5f480a4e (patch)
tree98a7baa328f1d20415fa3665ee12949cdcb44544 /tools
parent58a325e282d311371e92a81ad1a05e49283f3eb1 (diff)
Handle the case when the DATA_TYPE is not a simple type
Pick up change from Samba: commit 343db5326b369cbdef4b723e3056acc2a866a887 Author: Matthieu Patou <mat@matws.net> Date: Tue Sep 23 01:28:40 2014 -0700 pidl-wireshark: Handle the case when the DATA_TYPE is not a simple type Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Change-Id: I511a60beb392e5e92701d5ace1260397fb4be851 Reviewed-on: https://code.wireshark.org/review/5092 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools')
-rw-r--r--tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 76d8317290..d4ffee3808 100644
--- a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/tools/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,di,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,di,drep,$hf,$param);");
return;
}