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

sahlberg at samba.org sahlberg at samba.org
Thu Jul 5 07:19:15 GMT 2007


Author: sahlberg
Date: 2007-07-05 07:19:14 +0000 (Thu, 05 Jul 2007)
New Revision: 23721

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

Log:
For unions, The TAG and the ARM are aligned independently.

Move emitting ALIGN_TO_x_BYTES to after the tag has been dissected so the 
alignment only affects the ARM.



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	2007-07-05 06:15:40 UTC (rev 23720)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2007-07-05 07:19:14 UTC (rev 23721)
@@ -614,12 +614,6 @@
 	$self->pidl_code("$switch_type level;");
 	$self->pidl_code("");
 
-	if ($e->{ALIGN} > 1) {
-		$self->pidl_code("ALIGN_TO_$e->{ALIGN}_BYTES;");
-	}
-
-	$self->pidl_code("");
-
 	$self->pidl_code("old_offset = offset;");
 	$self->pidl_code("if (parent_tree) {");
 	$self->indent;
@@ -632,6 +626,12 @@
 
 	$self->pidl_code("offset = $switch_dissect(tvb, offset, pinfo, tree, drep, hf_index, &level);");
 
+	if ($e->{ALIGN} > 1) {
+		$self->pidl_code("ALIGN_TO_$e->{ALIGN}_BYTES;");
+		$self->pidl_code("");
+	}
+
+
 	$self->pidl_code("switch(level) {$res\t}");
 	$self->pidl_code("proto_item_set_len(item, offset-old_offset);\n");
 	$self->pidl_code("return offset;");



More information about the samba-cvs mailing list