зеркало из https://github.com/mozilla/pjs.git
Bug 396745 nsILDAPConnection::Init should take an nsILDAPURL as a parameter instead of three others. r/sr=bienvenu NPOTDFFB
This commit is contained in:
Родитель
8c12f82763
Коммит
7cb784ad65
|
@ -380,31 +380,6 @@ nsresult nsLDAPSyncQuery::InitConnection()
|
||||||
return NS_ERROR_NOT_INITIALIZED;
|
return NS_ERROR_NOT_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// host to connect to
|
|
||||||
//
|
|
||||||
nsCAutoString host;
|
|
||||||
rv = mServerURL->GetAsciiHost(host);
|
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
FinishLDAPQuery();
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// on which port
|
|
||||||
//
|
|
||||||
PRInt32 port;
|
|
||||||
rv = mServerURL->GetPort(&port);
|
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
FinishLDAPQuery();
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRUint32 options;
|
|
||||||
rv = mServerURL->GetOptions(&options);
|
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
FinishLDAPQuery();
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get a proxy object so the callback happens on the main thread
|
// get a proxy object so the callback happens on the main thread
|
||||||
//
|
//
|
||||||
rv = NS_GetProxyForObject(NS_PROXY_TO_CURRENT_THREAD,
|
rv = NS_GetProxyForObject(NS_PROXY_TO_CURRENT_THREAD,
|
||||||
|
@ -419,9 +394,7 @@ nsresult nsLDAPSyncQuery::InitConnection()
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = mConnection->Init(host.get(), port,
|
rv = mConnection->Init(mServerURL, EmptyCString(), selfProxy,
|
||||||
(options & nsILDAPURL::OPT_SECURE)
|
|
||||||
? PR_TRUE : PR_FALSE, EmptyCString(), selfProxy,
|
|
||||||
nsnull, mProtocolVersion);
|
nsnull, mProtocolVersion);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
FinishLDAPQuery();
|
FinishLDAPQuery();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче