The branch, v3-6-test has been updated
       via  a78b0d5 pidl:Samba4/NDR/Parser: fix NDR64 union alignment
      from  f991e79 s3: Initialize output vars in parse_ea_blob

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit a78b0d53043f82a77ba09fdfce73f5db63dff3ee
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Aug 16 17:35:50 2010 +0200

    pidl:Samba4/NDR/Parser: fix NDR64 union alignment
    
    We need to align before the switch_type and before the
    union arms. Both alignments are to the boundary of the largest
    possible union arm.
    
    This means that adding a new union arm with a larger alignment
    would break compat!!!
    
    metze
    
    Autobuild-User: Stefan Metzmacher <[email protected]>
    Autobuild-Date: Sun Oct 24 17:49:23 UTC 2010 on sn-devel-104
    (cherry picked from commit 482c02284068810a57b35a509857fb1273d833b0)

-----------------------------------------------------------------------

Summary of changes:
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 
b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index b389cfb..56b43a6 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1665,6 +1665,10 @@ sub ParseUnionPushPrimitives($$$$)
 
        $self->pidl("int level = ndr_push_get_switch_value($ndr, $varname);");
 
+       if (defined($e->{ALIGN})) {
+               $self->pidl("NDR_CHECK(ndr_push_union_align($ndr, 
$e->{ALIGN}));");
+       }
+
        if (defined($e->{SWITCH_TYPE})) {
                $self->pidl("NDR_CHECK(ndr_push_$e->{SWITCH_TYPE}($ndr, 
NDR_SCALARS, level));");
        }
@@ -1810,6 +1814,10 @@ sub ParseUnionPullPrimitives($$$$$)
        my ($self,$e,$ndr,$varname,$switch_type) = @_;
        my $have_default = 0;
 
+       if (defined($e->{ALIGN})) {
+               $self->pidl("NDR_CHECK(ndr_pull_union_align($ndr, 
$e->{ALIGN}));");
+       }
+
        if (defined($switch_type)) {
                $self->pidl("NDR_CHECK(ndr_pull_$switch_type($ndr, NDR_SCALARS, 
&_level));");
                $self->pidl("if (_level != level) {"); 


-- 
Samba Shared Repository

Reply via email to