Fix GetUserName such that it uses GetServer on the folder instead of calling GetCurrentServer from the acct manager. This fixes the imap problem where you couldn't perform cmds like displaying messages unless you imap server was the first one.

This commit is contained in:
mscott%netscape.com 1999-05-15 21:07:18 +00:00
Родитель 61459d3cc4
Коммит 0232710775
1 изменённых файлов: 5 добавлений и 9 удалений

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

@ -72,6 +72,7 @@ nsImapMailFolder::nsImapMailFolder() :
m_urlRunning(PR_FALSE), m_haveDiscoverAllFolders(PR_FALSE)
{
m_pathName = nsnull;
nsresult rv;
// Get current thread envent queue
@ -716,16 +717,11 @@ NS_IMETHODIMP nsImapMailFolder::GetUsersName(char** userName)
else
*userName = nsnull;
#if 1 // for now
NS_WITH_SERVICE(nsIMsgMailSession, session, kMsgMailSessionCID, &rv);
if (NS_SUCCEEDED(rv) && session)
{
nsCOMPtr<nsIMsgIncomingServer> server;
rv = session->GetCurrentServer(getter_AddRefs(server));
if (NS_SUCCEEDED(rv) && server)
nsCOMPtr<nsIMsgIncomingServer> server;
rv = GetServer(getter_AddRefs(server));
if (NS_SUCCEEDED(rv))
rv = server->GetUserName(userName);
}
#else // **** for the future
nsCOMPtr<nsIFolder> aFolder(do_QueryInterface((nsIMsgFolder*) this, &rv));
if (NS_FAILED(rv)) return rv;