diff options
author | Jeremy Allison <jra@samba.org> | 2011-02-18 09:01:46 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-02-18 18:49:55 +0100 |
commit | 187f695469071d0550613e037b36170facb85460 (patch) | |
tree | 25cc4179457f6314a45f53cfdc8d47ad9e1308e2 /pidl | |
parent | d05aa90384082c348113021500ac15716d060ead (diff) | |
download | samba-187f695469071d0550613e037b36170facb85460.tar.gz |
Fix alignment issues in SPOOLSS "BUFFER" marshalling.
Guenther and Metze please check !
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Feb 18 18:49:55 CET 2011 on sn-devel-104
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 075ad8516eb..eda583e7a80 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -1281,12 +1281,19 @@ sub ParseStructPushPrimitives($$$$$) sub ParseStructPushDeferred($$$$) { my ($self, $struct, $ndr, $varname, $env) = @_; + if (defined($struct->{PROPERTIES}{relative_base})) { + $self->pidl("NDR_CHECK(ndr_push_align($ndr, $struct->{ALIGN}));"); + # retrieve the current offset as base for relative pointers # based on the toplevel struct/union $self->pidl("NDR_CHECK(ndr_push_setup_relative_base_offset2($ndr, $varname));"); } $self->ParseElementPush($_, $ndr, $env, 0, 1) foreach (@{$struct->{ELEMENTS}}); + + if (defined($struct->{PROPERTIES}{relative_base})) { + $self->pidl("NDR_CHECK(ndr_push_trailer_align($ndr, $struct->{ALIGN}));"); + } } ##################################################################### |