summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-22 16:33:16 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-22 17:06:09 +0200
commit8277260ae78619793c8c404a75936cf423b15cfe (patch)
tree30c48445f8d1efd5af6fdaf8062947b910e8a213
parent390b54554c9f7cad68ef96d705e7829f156eb74f (diff)
downloadsamba-8277260ae78619793c8c404a75936cf423b15cfe.tar.gz
samba-8277260ae78619793c8c404a75936cf423b15cfe.tar.bz2
samba-8277260ae78619793c8c404a75936cf423b15cfe.zip
s3:libsmb/clirap2: make use of cli_state_remote_name()
metze
-rw-r--r--source3/libsmb/clirap2.c9
1 files changed, 5 insertions, 4 deletions
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))));
}
}