summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-01 16:08:02 +1000
committerKarolin Seeger <kseeger@samba.org>2009-11-26 11:40:03 +0100
commite8d08259743eb7a7bcbe4e5ee740a244bed293c4 (patch)
tree00f706f106feb7fafed20f564c9e08b8cb0f8b54 /pidl
parentdbdb289d3dfe2455038dda721dc1e8e152f1151e (diff)
downloadsamba-e8d08259743eb7a7bcbe4e5ee740a244bed293c4.tar.gz
ndr64: added support for trailing gap alignment
NDR64 has a 'trailing gap' alignment, which aligns the end of a structure on the overall structure alignment. This explains the discrepancy we had with the RPC-SAMR test and NDR64 (cherry picked from commit 6a11a1d720b12889b5cbe6ed1f7751ce0d22d4b9)
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 9a02d522a9b..11a43b4509d 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1235,6 +1235,8 @@ sub ParseStructPushPrimitives($$$$$)
}
$self->ParseElementPush($_, $ndr, $env, 1, 0) foreach (@{$struct->{ELEMENTS}});
+
+ $self->pidl("NDR_CHECK(ndr_push_trailer_align($ndr, $struct->{ALIGN}));");
}
sub ParseStructPushDeferred($$$$)
@@ -1533,6 +1535,8 @@ sub ParseStructPullPrimitives($$$$$)
$self->ParseElementPull($_, $ndr, $env, 1, 0) foreach (@{$struct->{ELEMENTS}});
$self->add_deferred();
+
+ $self->pidl("NDR_CHECK(ndr_pull_trailer_align($ndr, $struct->{ALIGN}));");
}
sub ParseStructPullDeferred($$$$$)