From 0acd76fbce92ac9d50a178ed436c3db37e97882e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 26 Sep 2013 01:20:10 +0200 Subject: [PATCH] pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider (cherry picked from commit f50b561336c7b6c08300e6e477859d1f9fab62c2) --- pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index c796b466add..fed94cde5da 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -693,6 +693,20 @@ sub ParseFunction_Sync($$$$) } $self->pidl(""); + $self->pidl("/* Out parameters */"); + foreach my $e (@{$fn->{ELEMENTS}}) { + next unless grep(/out/, @{$e->{DIRECTION}}); + + $self->ParseCopyArgument($fn, $e, "r.out.", "_"); + } + $self->pidl(""); + + if (defined($fn->{RETURN_TYPE})) { + $self->pidl("/* Result */"); + $self->pidl("ZERO_STRUCT(r.out.result);"); + $self->pidl(""); + } + $self->pidl("status = dcerpc_$name\_r(h, mem_ctx, &r);"); $self->pidl("if (!NT_STATUS_IS_OK(status)) {"); $self->indent; -- 2.11.4.GIT