mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s3: libsmb: Remove get_sorted_dc_list().
No more callers. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
committed by
Noel Power
parent
e8b7162415
commit
a0984e5064
@ -3962,57 +3962,6 @@ static NTSTATUS get_dc_list(const char *domain,
|
||||
return status;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Small wrapper function to get the DC list and sort it if neccessary.
|
||||
*********************************************************************/
|
||||
|
||||
NTSTATUS get_sorted_dc_list( const char *domain,
|
||||
const char *sitename,
|
||||
struct ip_service **ip_list,
|
||||
int *count,
|
||||
bool ads_only )
|
||||
{
|
||||
bool ordered = false;
|
||||
NTSTATUS status;
|
||||
enum dc_lookup_type lookup_type = DC_NORMAL_LOOKUP;
|
||||
|
||||
*ip_list = NULL;
|
||||
*count = 0;
|
||||
|
||||
DEBUG(8,("get_sorted_dc_list: attempting lookup "
|
||||
"for name %s (sitename %s)\n",
|
||||
domain,
|
||||
sitename ? sitename : "NULL"));
|
||||
|
||||
if (ads_only) {
|
||||
lookup_type = DC_ADS_ONLY;
|
||||
}
|
||||
|
||||
status = get_dc_list(domain, sitename, ip_list,
|
||||
count, lookup_type, &ordered);
|
||||
if (NT_STATUS_EQUAL(status, NT_STATUS_NO_LOGON_SERVERS)
|
||||
&& sitename) {
|
||||
DEBUG(3,("get_sorted_dc_list: no server for name %s available"
|
||||
" in site %s, fallback to all servers\n",
|
||||
domain, sitename));
|
||||
status = get_dc_list(domain, NULL, ip_list,
|
||||
count, lookup_type, &ordered);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
SAFE_FREE(*ip_list);
|
||||
*count = 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
/* only sort if we don't already have an ordered list */
|
||||
if (!ordered) {
|
||||
sort_service_list(*ip_list, *count);
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Talloc version.
|
||||
Small wrapper function to get the DC list and sort it if neccessary.
|
||||
|
@ -109,11 +109,6 @@ NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
|
||||
unsigned int *p_num_entries);
|
||||
bool find_master_ip(const char *group, struct sockaddr_storage *master_ss);
|
||||
bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss);
|
||||
NTSTATUS get_sorted_dc_list( const char *domain,
|
||||
const char *sitename,
|
||||
struct ip_service **ip_list,
|
||||
int *count,
|
||||
bool ads_only );
|
||||
NTSTATUS get_sorted_dc_list_talloc(TALLOC_CTX *ctx,
|
||||
const char *domain,
|
||||
const char *sitename,
|
||||
|
Reference in New Issue
Block a user