From 4361b5cea56972b534ba36d89b521f9ad240d3d7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Aug 2002 05:11:57 +0000 Subject: when using netbios lookup methods make sure we try any BDCs even if we get a response from WINS for a PDC, if the PDC isn't responding. (This used to be commit 57916316ffc70b0b6659f3ad9d14aad41fad4c71) --- source3/libads/ldap.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index c8d940f331..2672489482 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -167,20 +167,32 @@ static BOOL ads_try_netbios(ADS_STRUCT *ads) DEBUG(6,("ads_try_netbios: looking for workgroup '%s'\n", workgroup)); - if (!get_dc_list(True, workgroup, &ip_list, &count) && - !get_dc_list(False, workgroup, &ip_list, &count)) { - return False; + /* try the PDC first */ + if (get_dc_list(True, workgroup, &ip_list, &count)) { + for (i=0;i