diff --git a/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp b/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp index 5d6e4111256..b0beb9f7599 100644 --- a/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp +++ b/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp @@ -380,31 +380,6 @@ nsresult nsLDAPSyncQuery::InitConnection() 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 // rv = NS_GetProxyForObject(NS_PROXY_TO_CURRENT_THREAD, @@ -419,9 +394,7 @@ nsresult nsLDAPSyncQuery::InitConnection() return NS_ERROR_FAILURE; } - rv = mConnection->Init(host.get(), port, - (options & nsILDAPURL::OPT_SECURE) - ? PR_TRUE : PR_FALSE, EmptyCString(), selfProxy, + rv = mConnection->Init(mServerURL, EmptyCString(), selfProxy, nsnull, mProtocolVersion); if (NS_FAILED(rv)) { FinishLDAPQuery();