summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_srvsvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client/cli_srvsvc.c')
-rw-r--r--source3/rpc_client/cli_srvsvc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c
index b6c6b377ff..1bdd19620b 100644
--- a/source3/rpc_client/cli_srvsvc.c
+++ b/source3/rpc_client/cli_srvsvc.c
@@ -23,14 +23,14 @@
#include "includes.h"
-WERROR cli_srvsvc_net_srv_get_info(struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 switch_value, SRV_INFO_CTR *ctr)
+NTSTATUS 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;
- WERROR result = W_ERROR(ERRgeneral);
+ NTSTATUS result;
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -47,17 +47,21 @@ WERROR 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))
+ !rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &qbuf, &rbuf)) {
+ result = NT_STATUS_UNSUCCESSFUL;
goto done;
+ }
/* Unmarshall response */
r.ctr = ctr;
- if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0))
+ if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0)) {
+ result = NT_STATUS_UNSUCCESSFUL;
goto done;
+ }
- result = r.status;
+ result = werror_to_ntstatus(r.status);
done:
prs_mem_free(&qbuf);