From bb0d063f01368c874774276ddb599e606c92ee49 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 22 Jul 2011 16:19:00 +0200 Subject: s3:lib/netapi: make use of cli_state_remote_name() metze --- source3/lib/netapi/cm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3/lib/netapi') diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index d41a5caf5a..251e98c2c2 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -48,7 +48,9 @@ static struct client_ipc_connection *ipc_cm_find( struct client_ipc_connection *p; for (p = priv_ctx->ipc_connections; p; p = p->next) { - if (strequal(p->cli->desthost, server_name)) { + const char *remote_name = cli_state_remote_name(p->cli); + + if (strequal(remote_name, server_name)) { return p; } } @@ -164,12 +166,15 @@ static NTSTATUS pipe_cm_find(struct client_ipc_connection *ipc, struct client_pipe_connection *p; for (p = ipc->pipe_connections; p; p = p->next) { + const char *ipc_remote_name; if (!rpc_pipe_np_smb_conn(p->pipe)) { return NT_STATUS_PIPE_EMPTY; } - if (strequal(ipc->cli->desthost, p->pipe->desthost) + ipc_remote_name = cli_state_remote_name(ipc->cli); + + if (strequal(ipc_remote_name, p->pipe->desthost) && ndr_syntax_id_equal(&p->pipe->abstract_syntax, interface)) { *presult = p->pipe; -- cgit