svn commit: samba r19559 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark: .

jelmer at samba.org jelmer at samba.org
Sat Nov 4 21:53:01 GMT 2006


Author: jelmer
Date: 2006-11-04 21:53:00 +0000 (Sat, 04 Nov 2006)
New Revision: 19559

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19559

Log:
Fix handling of types where the name isn't prefixed by the interface name. 
Based on patch by Julien Kerihuel.

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2006-11-04 20:57:32 UTC (rev 19558)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2006-11-04 21:53:00 UTC (rev 19559)
@@ -256,9 +256,9 @@
 	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 @@
 				$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 @@
 		pidl_code "{";
 		indent;
 
-		ElementLevel($e,$_,$hf,$dissectorname.$add,$pn);
+		ElementLevel($e,$_,$hf,$dissectorname.$add,$pn,$ifname);
 
 		pidl_code "";
 		pidl_code "return offset;";



More information about the samba-cvs mailing list