summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm7
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 075ad8516e..eda583e7a8 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}));");
+ }
}
#####################################################################