pidl:Samba4/Client: don't mix rpc and application NTSTATUS errors anymore for the...
authorStefan Metzmacher <metze@samba.org>
Sat, 27 Mar 2010 11:48:21 +0000 (12:48 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 29 Mar 2010 13:35:53 +0000 (15:35 +0200)
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

index aa9dad9d525ac1da92697a8b5a1cdccfdedc26ab..43fe61196e1a920202db972c271272e5a4fbc663 100644 (file)
@@ -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";
 }