From 8277260ae78619793c8c404a75936cf423b15cfe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 22 Jul 2011 16:33:16 +0200 Subject: s3:libsmb/clirap2: make use of cli_state_remote_name() metze --- source3/libsmb/clirap2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c index 1d36ca65ca..8c8968651b 100644 --- a/source3/libsmb/clirap2.c +++ b/source3/libsmb/clirap2.c @@ -1535,7 +1535,7 @@ bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_n } else { DEBUG(4, ("cli_get_pdc_name: machine %s failed the " "NetServerEnum call. Error was : %s.\n", - cli->desthost, + cli_state_remote_name(cli), win_errstr(W_ERROR(cli->rap_error)))); } } @@ -1756,7 +1756,7 @@ bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli, * PURPOSE: Remotes a NetServerEnum2 API call to the current server * requesting server_info_0 level information of machines * matching the given server type. If the returned server -* list contains the machine name contained in cli->desthost +* list contains the machine name contained in cli_state_remote_name() * then we conclude the server type checks out. This routine * is useful to retrieve list of server's of a certain * type when all you have is a null session connection and @@ -1791,6 +1791,7 @@ bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty +RAP_MACHNAME_LEN]; /* workgroup */ bool found_server = false; int res = -1; + const char *remote_name = cli_state_remote_name(cli); /* send a SMBtrans command with api NetServerEnum */ p = make_header(param, RAP_NetServerEnum2, @@ -1826,7 +1827,7 @@ bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty RAP_MACHNAME_LEN, RAP_MACHNAME_LEN, endp); - if (strequal(ret_server, cli->desthost)) { + if (strequal(ret_server, remote_name)) { found_server = true; break; } @@ -1834,7 +1835,7 @@ bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty } else { DEBUG(4, ("cli_ns_check_server_type: machine %s " "failed the NetServerEnum call. Error was : " - "%s.\n", cli->desthost, + "%s.\n", remote_name, win_errstr(W_ERROR(cli->rap_error)))); } } -- cgit