From 3acd6bde58ecd68faf8200268cc674a71c57778d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 6 Apr 2011 14:35:24 +0200 Subject: s3-netapi: use libnetapi_get_binding_handle(). Guenther --- source3/lib/netapi/shutdown.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'source3/lib/netapi/shutdown.c') diff --git a/source3/lib/netapi/shutdown.c b/source3/lib/netapi/shutdown.c index 199325b170..78bc2fce6b 100644 --- a/source3/lib/netapi/shutdown.c +++ b/source3/lib/netapi/shutdown.c @@ -34,19 +34,16 @@ WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx, { WERROR werr; NTSTATUS status; - struct rpc_pipe_client *pipe_cli = NULL; struct lsa_StringLarge message; struct dcerpc_binding_handle *b; - werr = libnetapi_open_pipe(ctx, r->in.server_name, - &ndr_table_initshutdown.syntax_id, - &pipe_cli); + werr = libnetapi_get_binding_handle(ctx, r->in.server_name, + &ndr_table_initshutdown.syntax_id, + &b); if (!W_ERROR_IS_OK(werr)) { goto done; } - b = pipe_cli->binding_handle; - init_lsa_StringLarge(&message, r->in.message); status = dcerpc_initshutdown_Init(b, talloc_tos(), @@ -82,18 +79,15 @@ WERROR NetShutdownAbort_r(struct libnetapi_ctx *ctx, { WERROR werr; NTSTATUS status; - struct rpc_pipe_client *pipe_cli = NULL; struct dcerpc_binding_handle *b; - werr = libnetapi_open_pipe(ctx, r->in.server_name, - &ndr_table_initshutdown.syntax_id, - &pipe_cli); + werr = libnetapi_get_binding_handle(ctx, r->in.server_name, + &ndr_table_initshutdown.syntax_id, + &b); if (!W_ERROR_IS_OK(werr)) { goto done; } - b = pipe_cli->binding_handle; - status = dcerpc_initshutdown_Abort(b, talloc_tos(), NULL, &werr); -- cgit