revert unrelated change I accidentally landed with patch for bug 574441
authorDavid Bienvenu <bienvenu@nventure.com>
Fri, 21 Jan 2011 07:27:51 -0800
changeset 6990 df7550b1d71ac40be42f56823b2e93669560aaf1
parent 6989 d0d624b467b63418cbe9f313f0062f8fc35f2ec2
child 6991 88032a4ef8386b9b5df07832307144918d8b4796
push idunknown
push userunknown
push dateunknown
bugs574441
revert unrelated change I accidentally landed with patch for bug 574441
mailnews/imap/src/nsImapIncomingServer.cpp
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -859,27 +859,18 @@ nsImapIncomingServer::CreateProtocolInst
       break;
   }
   nsIImapProtocol * protocolInstance;
   rv = CallCreateInstance(kImapProtocolCID, &protocolInstance);
   if (NS_SUCCEEDED(rv) && protocolInstance)
   {
     nsCOMPtr<nsIImapHostSessionList> hostSession =
       do_GetService(kCImapHostSessionListCID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-    PRInt32 socketType;
-    if (NS_SUCCEEDED(GetSocketType(&socketType)) &&
-        socketType == nsMsgSocketType::trySTARTTLS)
-    {
-      PRUint32 capability = kCapabilityUndefined;
-      hostSession->GetCapabilityForHost(m_serverKey.get(), capability);
-      if (capability & kHasStartTLSCapability)
-        SetSocketType(nsMsgSocketType::alwaysSTARTTLS);
-    }
-    rv = protocolInstance->Initialize(hostSession, this, aEventTarget);
+    if (NS_SUCCEEDED(rv))
+      rv = protocolInstance->Initialize(hostSession, this, aEventTarget);
   }
 
   // take the protocol instance and add it to the connectionCache
   if (protocolInstance)
     m_connectionCache.AppendObject(protocolInstance);
   *aImapConnection = protocolInstance; // this is already ref counted.
   return rv;
 }