From f50b561336c7b6c08300e6e477859d1f9fab62c2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 26 Sep 2013 01:20:10 +0200 Subject: pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pidl') diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index 06cc65a2a61..f02b8b20251 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -692,6 +692,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; -- cgit