From fcd10d26a407bef323cb8beda39a21aeb1e5b144 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Aug 2008 17:59:23 +0200 Subject: netapi: make libnetapi_open_ipc_connection static. Guenther (cherry picked from commit 0259914f8ff04514a8395d8e1af61aadd50c5efb) (This used to be commit 7edc671cc1007ae216e7efdbcdb9cfa1e547dca5) --- source3/lib/netapi/cm.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'source3/lib/netapi/cm.c') diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 8ea31e54f9..a5c85bfe6b 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -25,9 +25,9 @@ /******************************************************************** ********************************************************************/ -WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, - const char *server_name, - struct cli_state **cli) +static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, + const char *server_name, + struct cli_state **cli) { struct cli_state *cli_ipc = NULL; @@ -161,17 +161,25 @@ static NTSTATUS pipe_cm_open(TALLOC_CTX *ctx, ********************************************************************/ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx, - struct cli_state *cli, + const char *server_name, const struct ndr_syntax_id *interface, + struct cli_state **pcli, struct rpc_pipe_client **presult) { struct rpc_pipe_client *result = NULL; NTSTATUS status; + WERROR werr; + struct cli_state *cli = NULL; - if (!cli || !presult) { + if (!presult) { return WERR_INVALID_PARAM; } + werr = libnetapi_open_ipc_connection(ctx, server_name, &cli); + if (!W_ERROR_IS_OK(werr)) { + return werr; + } + status = pipe_cm_open(ctx, cli, interface, &result); if (!NT_STATUS_IS_OK(status)) { libnetapi_set_error_string(ctx, "failed to open PIPE %s: %s", @@ -182,6 +190,8 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx, } *presult = result; + *pcli = cli; + return WERR_OK; } -- cgit