]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Use rpccli_svcctl_QueryServiceStatus() in net.
authorGünther Deschner <gd@samba.org>
Tue, 19 Feb 2008 01:43:04 +0000 (02:43 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 19 Feb 2008 02:13:18 +0000 (03:13 +0100)
Guenther

source/utils/net_rpc_service.c

index 3c22bfe3811dcd61a3be48d395742f17cb2990c8..242d653017d6c58ea67bf331e6a6ce90d72c701d 100644 (file)
@@ -50,8 +50,12 @@ static WERROR query_service_state(struct rpc_pipe_client *pipe_hnd,
                return result;
        }
 
-       result = rpccli_svcctl_query_status(pipe_hnd, mem_ctx, &hService, &service_status  );
-       if ( W_ERROR_IS_OK(result) ) {
+       status = rpccli_svcctl_QueryServiceStatus(pipe_hnd, mem_ctx,
+                                                 &hService,
+                                                 &service_status,
+                                                 &result);
+
+       if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) {
                *state = service_status.state;
        }
 
@@ -269,8 +273,12 @@ static NTSTATUS rpc_service_status_internal(const DOM_SID *domain_sid,
 
        /* get the status */
 
-       result = rpccli_svcctl_query_status(pipe_hnd, mem_ctx, &hService, &service_status  );
-       if ( !W_ERROR_IS_OK(result) ) {
+       status = rpccli_svcctl_QueryServiceStatus(pipe_hnd, mem_ctx,
+                                                 &hService,
+                                                 &service_status,
+                                                 &result);
+
+       if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) {
                d_fprintf(stderr, "Query status request failed.  [%s]\n", dos_errstr(result));
                goto done;
        }