summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-02-17 04:35:32 +0000
committerTim Potter <tpot@samba.org>2003-02-17 04:35:32 +0000
commite48639626704405d033fef247437462ef7b8c0b5 (patch)
tree2772a05baeec2a1e3575e8f8cc4c3333da89fd1c /source3/rpc_client
parentffacf609a6e93fad6964284dcfd6028f5c7f1628 (diff)
downloadsamba-e48639626704405d033fef247437462ef7b8c0b5.tar.gz
samba-e48639626704405d033fef247437462ef7b8c0b5.tar.bz2
samba-e48639626704405d033fef247437462ef7b8c0b5.zip
Return a WERROR instead of a NTSTATUS like the rest of the srvsvc
rpc calls. (This used to be commit 619af61644ecc221c45e5cf69d562451b5b9f951)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_srvsvc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c
index 1bdd19620b..b6c6b377ff 100644
--- a/source3/rpc_client/cli_srvsvc.c
+++ b/source3/rpc_client/cli_srvsvc.c
@@ -23,14 +23,14 @@
#include "includes.h"
-NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 switch_value, SRV_INFO_CTR *ctr)
+WERROR cli_srvsvc_net_srv_get_info(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 switch_value, SRV_INFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
SRV_Q_NET_SRV_GET_INFO q;
SRV_R_NET_SRV_GET_INFO r;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -47,21 +47,17 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli,
/* Marshall data and send request */
if (!srv_io_q_net_srv_get_info("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &qbuf, &rbuf)) {
- result = NT_STATUS_UNSUCCESSFUL;
+ !rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &qbuf, &rbuf))
goto done;
- }
/* Unmarshall response */
r.ctr = ctr;
- if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0)) {
- result = NT_STATUS_UNSUCCESSFUL;
+ if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0))
goto done;
- }
- result = werror_to_ntstatus(r.status);
+ result = r.status;
done:
prs_mem_free(&qbuf);