fixed bug 44699 -- IMAP does not check result param from nsIMsgAccountManager::FindServer(); r=bienvenu, alecf

This commit is contained in:
jefft%netscape.com 2000-07-07 22:27:03 +00:00
Родитель 89cac70734
Коммит 52eb0d4b73
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -2721,15 +2721,16 @@ NS_IMETHODIMP nsImapService::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI
NS_MSGACCOUNTMANAGER_PROGID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIMsgIncomingServer> aServer;
nsCOMPtr<nsIMsgIncomingServer> server;
rv = accountManager->FindServer(userName, hostName, "imap",
getter_AddRefs(aServer));
getter_AddRefs(server));
// if we can't extract the imap server from this url then give up!!!
if (NS_FAILED(rv)) return rv;
NS_ENSURE_TRUE(server, NS_ERROR_FAILURE);
// now try to get the folder in question...
nsCOMPtr<nsIFolder> aRootFolder;
aServer->GetRootFolder(getter_AddRefs(aRootFolder));
server->GetRootFolder(getter_AddRefs(aRootFolder));
if (aRootFolder && folderName && (* ((const char *) folderName)) )
{