/* Search to the start of the list. */
for (p = cli; p; p = DLIST_PREV(p)) {
- if (strequal(server, p->desthost) &&
+ const char *remote_name =
+ cli_state_remote_name(p);
+
+ if (strequal(server, remote_name) &&
strequal(share,p->share)) {
return p;
}
/* Search to the end of the list. */
for (p = cli->next; p; p = p->next) {
- if (strequal(server, p->desthost) &&
+ const char *remote_name =
+ cli_state_remote_name(p);
+
+ if (strequal(server, remote_name) &&
strequal(share,p->share)) {
return p;
}
for (i=0; cli; cli = cli->next,i++ ) {
d_printf("%d:\tserver=%s, share=%s\n",
- i, cli->desthost, cli->share );
+ i, cli_state_remote_name(cli), cli->share);
}
}
}
return talloc_asprintf(ctx, "%c%s%c%s%c%s",
path_sep,
- cli->desthost,
+ cli_state_remote_name(cli),
path_sep,
cli->share,
path_sep,
status = cli_cm_open(ctx,
rootcli,
- rootcli->desthost,
+ cli_state_remote_name(rootcli),
"IPC$",
dfs_auth_info,
false,
uint16 cnum;
char *newextrapath = NULL;
NTSTATUS status;
+ const char *remote_name = cli_state_remote_name(cli);
if (!cli || !sharename) {
return false;
/* send a trans2_query_path_info to check for a referral */
- fullpath = talloc_asprintf(ctx, "\\%s\\%s", cli->desthost, sharename );
+ fullpath = talloc_asprintf(ctx, "\\%s\\%s", remote_name, sharename);
if (!fullpath) {
return false;
}
/* check that this is not a self-referral */
- if (strequal(cli->desthost, *pp_newserver) &&
+ if (strequal(remote_name, *pp_newserver) &&
strequal(sharename, *pp_newshare)) {
return false;
}