const struct ndr_interface_call *call;
const char *name;
NTSTATUS status;
+ WERROR werr;
name = table->calls[opnum].name;
call = &table->calls[opnum];
status = dcerpc_binding_handle_call_recv(subreq);
TALLOC_FREE(subreq);
- dce_call->fault_code = priv->c_pipe->last_fault_code;
+ werr = ntstatus_to_werror(status);
+
+ /* TODO add a better mapping */
+ dce_call->fault_code = W_ERROR_V(werr);
if (dce_call->fault_code != 0) {
DEBUG(0,("dcesrv_remote: call[%s] failed with: %s!\n",
name, dcerpc_errstr(dce_call, dce_call->fault_code)));