s3:cli_pipe: make use of cli_state_remote_name()
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Jul 2011 14:44:02 +0000 (16:44 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 22 Jul 2011 15:06:09 +0000 (17:06 +0200)
metze

source3/rpc_client/cli_pipe.c

index 710b94b5d1c20ca235911387dadb44c903098dcd..d71a10601962559b90ab0992a80d2a5d19dcb2a9 100644 (file)
@@ -33,7 +33,7 @@
 #include "librpc/crypto/spnego.h"
 #include "rpc_dce.h"
 #include "cli_pipe.h"
-#include "client.h"
+#include "libsmb/libsmb.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_CLI
@@ -2763,7 +2763,7 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli,
 
        result->abstract_syntax = *abstract_syntax;
        result->transfer_syntax = ndr_transfer_syntax;
-       result->desthost = talloc_strdup(result, cli->desthost);
+       result->desthost = talloc_strdup(result, cli_state_remote_name(cli));
        result->srv_name_slash = talloc_asprintf_strupper_m(
                result, "\\\\%s", result->desthost);
 
@@ -2816,8 +2816,8 @@ static NTSTATUS cli_rpc_pipe_open(struct cli_state *cli,
 {
        switch (transport) {
        case NCACN_IP_TCP:
-               return rpc_pipe_open_tcp(NULL, cli->desthost, interface,
-                                        presult);
+               return rpc_pipe_open_tcp(NULL, cli_state_remote_name(cli),
+                                        interface, presult);
        case NCACN_NP:
                return rpc_pipe_open_np(cli, interface, presult);
        default: