ignore ldap hosts after the first host (i.e., space delimited host lists) until we can make multiple hosts work r=mscott, sr=dmose,a=asa 223603

This commit is contained in:
bienvenu%nventure.com 2003-10-25 15:34:39 +00:00
parent 2316ca4f0e
commit 725056250a

View File

@ -234,6 +234,18 @@ nsLDAPConnection::Init(const char *aHost, PRInt32 aPort, PRBool aSSL,
return NS_ERROR_FAILURE;
}
mDNSHost = aHost;
// if the caller has passed in a space-delimited set of hosts, as the
// ldap c-sdk allows, strip off the trailing hosts for now.
// Soon, we'd like to make multiple hosts work, but now make
// at least the first one work.
mDNSHost.CompressWhitespace(PR_TRUE, PR_TRUE);
PRInt32 spacePos = mDNSHost.FindChar(' ');
// trim off trailing host(s)
if (spacePos != kNotFound)
mDNSHost.Truncate(spacePos);
rv = pDNSService->AsyncResolve(mDNSHost,
PR_FALSE, this, curEventQ,
getter_AddRefs(mDNSRequest));