From 1463ca1d2bafd5eff003cb4dbb5671e5e8afe80a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Sep 2006 22:18:16 +0000 Subject: r18689: Initialize r.out in the server side code, in case the handler function doesn't touch them. (This used to be commit 2ac2c7ca60c70d70a07162c63bfb492c74816c7c) --- source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/pidl/lib/Parse/Pidl/Samba3') 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}}) { -- cgit