summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-04-24 00:00:40 +0200
committerStefan Metzmacher <metze@samba.org>2011-04-24 10:44:53 +0200
commitf7bc84409a7a6736ec2cf1110dd7200a954e3b7e (patch)
tree06957e31b9ff2507842260c7cc969cd2645c1029 /source3/rpc_client
parente7cf7204e60552b45952325f343ea894fda21346 (diff)
downloadsamba-f7bc84409a7a6736ec2cf1110dd7200a954e3b7e.tar.gz
samba-f7bc84409a7a6736ec2cf1110dd7200a954e3b7e.tar.bz2
samba-f7bc84409a7a6736ec2cf1110dd7200a954e3b7e.zip
s3:rpc_client: map fault codes to NTSTATUS with dcerpc_fault_to_nt_status()
Most fault codes have a NTSTATUS representation, so use that. This brings the fault handling in common with the source4/librpc/rpc code, which make it possible to share more highlevel code, between source3 and source4 as the error checking can be the same now. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sun Apr 24 10:44:53 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index d7f990af2c..55cc5f8b34 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -469,11 +469,7 @@ static NTSTATUS cli_pipe_validate_current_pdu(TALLOC_CTX *mem_ctx,
pkt->u.fault.status),
rpccli_pipe_txt(talloc_tos(), cli)));
- if (NT_STATUS_IS_OK(NT_STATUS(pkt->u.fault.status))) {
- return NT_STATUS_UNSUCCESSFUL;
- } else {
- return NT_STATUS(pkt->u.fault.status);
- }
+ return dcerpc_fault_to_nt_status(pkt->u.fault.status);
default:
DEBUG(0, (__location__ "Unknown packet type %u received "