From e230c8dd2441181963c6df678be06cdaaf6cb822 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 27 Mar 2010 12:48:21 +0100 Subject: pidl:Samba4/Client: don't mix rpc and application NTSTATUS errors anymore for the new bindings The new dcerpc_binding_handle based client stubs don't mix error codes anymore, while the old dcerpc_pipe based ones still do to keep OpenChange happy for now. metze --- pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index aa9dad9d52..43fe61196e 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -280,7 +280,22 @@ sub ParseFunction_r_Sync($$$) $res .= "\t\tstruct dcerpc_pipe);\n"; $res .= "\n"; - $res .= "\treturn dcerpc_$name(p, mem_ctx, r);\n"; + $res .= " + NTSTATUS status; + + if (p->conn->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG($name, r); + } + + status = dcerpc_ndr_request(p, NULL, &ndr_table_$interface->{NAME}, + NDR_$uname, mem_ctx, r); + + if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG($name, r); + } + return status; +"; + $res .= "}\n"; $res .= "\n"; } -- cgit