pidl: fix generated s3-server in,out,ref qualifiers that are used for buffer allocation.
authorGünther Deschner <gd@samba.org>
Wed, 19 Nov 2008 11:38:38 +0000 (12:38 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 19 Nov 2008 20:50:02 +0000 (21:50 +0100)
Guenther

pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm

index e5d8f1c1d2b8c4ae42710d59e4b47dd7949384a2..eb3cdf20cb060d2c18fb19abcae946c109bf38c4 100644 (file)
@@ -142,6 +142,13 @@ sub ParseFunction($$)
                my @dir = @{$_->{DIRECTION}};
                if (grep(/in/, @dir) and grep(/out/, @dir)) {
                        pidl "r->out.$_->{NAME} = r->in.$_->{NAME};";
                my @dir = @{$_->{DIRECTION}};
                if (grep(/in/, @dir) and grep(/out/, @dir)) {
                        pidl "r->out.$_->{NAME} = r->in.$_->{NAME};";
+               }
+       }
+
+       foreach (@{$fn->{ELEMENTS}}) {
+               my @dir = @{$_->{DIRECTION}};
+               if (grep(/in/, @dir) and grep(/out/, @dir)) {
+                       # noop
                } elsif (grep(/out/, @dir) and not
                                 has_property($_, "represent_as")) {
                        AllocOutVar($_, "r", "r->out.$_->{NAME}", $env);
                } elsif (grep(/out/, @dir) and not
                                 has_property($_, "represent_as")) {
                        AllocOutVar($_, "r", "r->out.$_->{NAME}", $env);