From: Aurelien Aptel Date: Wed, 18 May 2016 13:01:56 +0000 (+0200) Subject: pidl/ws: fix missing $name when generating MAPI dissector X-Git-Tag: tdb-1.3.10~762 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d348bdb8d6aa53ddf5d7a4c9c02777a79668bbe;p=thirdparty%2Fsamba.git pidl/ws: fix missing $name when generating MAPI dissector Port Wireshark commit 0e80176 Author: Alexis La Goutte Date: Fri Mar 4 19:28:26 2016 +0100 PIDL (NDR): fix missing $name when regenerate MAPI dissector Issue coming from ge41f08858b Signed-off-by: Aurelien Aptel Reviewed-by: Stefan Metzmacher Reviewed-by: David Disseldorp Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Mon Jun 20 16:20:00 CEST 2016 on sn-devel-144 --- diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 72a144f09f7..816164615ee 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -454,15 +454,18 @@ sub Element($$$$$$) } my $switch_type = "g${switch_raw_type}"; - $moreparam = ", $switch_type *".$name; - + if ($name ne "") { + $moreparam = ", $switch_type *".$name; + } else { + $moreparam = ""; + } if (($e->{PROPERTIES}->{switch_is} eq "") && ($switchvars{$name}) && #not a "native" type (!($type =~ /^uint(8|16|1632|32|3264|64)/))) { $param = $name; } elsif ( $switch_dt->{DATA}->{TYPE} eq "ENUM") { $param = $name; - } else { + } elsif ($name ne "") { $param = "*".$name; }