From: Jeremy Allison Date: Tue, 8 Sep 2020 23:37:29 +0000 (-0700) Subject: s3: libads: Remove cldap_ping_list(). X-Git-Tag: talloc-2.3.2~511 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bef9ebd8c9768816b14ecf70062e6cf2104c79b9;p=thirdparty%2Fsamba.git s3: libads: Remove cldap_ping_list(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 2a0c5f13219..7c05e482f4d 100755 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -340,46 +340,6 @@ static bool ads_try_connect(ADS_STRUCT *ads, bool gc, return ret; } -#if 0 -/********************************************************************** - send a cldap ping to list of servers, one at a time, until one of - them answers it's an ldap server. Record success in the ADS_STRUCT. - Take note of and update negative connection cache. -**********************************************************************/ - -static NTSTATUS cldap_ping_list(ADS_STRUCT *ads, - const char *domain, - struct ip_service *ip_list, - size_t count) -{ - size_t i; - bool ok; - - for (i = 0; i < count; i++) { - char server[INET6_ADDRSTRLEN]; - - print_sockaddr(server, sizeof(server), &ip_list[i].ss); - - if (!NT_STATUS_IS_OK( - check_negative_conn_cache(domain, server))) - continue; - - /* Returns ok only if it matches the correct server type */ - ok = ads_try_connect(ads, false, &ip_list[i].ss); - - if (ok) { - return NT_STATUS_OK; - } - - /* keep track of failures */ - add_failed_connection_entry(domain, server, - NT_STATUS_UNSUCCESSFUL); - } - - return NT_STATUS_NO_LOGON_SERVERS; -} -#endif - /********************************************************************** send a cldap ping to list of servers, one at a time, until one of them answers it's an ldap server. Record success in the ADS_STRUCT.