summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4/NDR
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-01 16:08:02 +1000
committerAndrew Tridgell <tridge@samba.org>2009-10-02 12:05:59 +1000
commit9eb78be4a670615b4e6a722f121f0f0e585b8d6b (patch)
treea38160b79695752f20e8440b66e0dd30a8c6371d /pidl/lib/Parse/Pidl/Samba4/NDR
parent1726038708bcebd706dc4565963611dc86a33699 (diff)
downloadsamba-9eb78be4a670615b4e6a722f121f0f0e585b8d6b.tar.gz
samba-9eb78be4a670615b4e6a722f121f0f0e585b8d6b.tar.bz2
samba-9eb78be4a670615b4e6a722f121f0f0e585b8d6b.zip
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
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4/NDR')
-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 9a02d522a9..11a43b4509 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($$$$$)