diff options
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 4d3dba2e0e..8ef4529402 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -82,11 +82,15 @@ sub ParseFunction($$) pidl ""; my %env = (); + my $hasout = 0; foreach (@{$fn->{ELEMENTS}}) { + if (grep(/out/, @{$_->{DIRECTION}})) { $hasout = 1; } next unless (grep (/in/, @{$_->{DIRECTION}})); $env{$_->{NAME}} = "r.in.$_->{NAME}"; } + pidl "ZERO_STRUCT(r.out);" if ($hasout); + my $proto = "_$fn->{NAME}(pipes_struct *p"; my $ret = "_$fn->{NAME}(p"; foreach (@{$fn->{ELEMENTS}}) { |