mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
fix 130643 can't read imap messages w/o mem cache r=cavin, sr=mscott,sspitzer a=shaver 130616 bad imap password sent to the server multiple times w/o reprompting user r=cavin, sr=sspitzer, a=shaver, 130603 loading messages with images on server w/o other users namespace causes prompt to subscribe to folder r=cavin, sr=sspitzer, a=shaver
This commit is contained in:
parent
f969952304
commit
a9d6db5667
@ -6826,6 +6826,7 @@ PRBool nsImapProtocol::TryToLogon()
|
|||||||
m_hostSessionList->SetPasswordForHost(GetImapServerKey(), nsnull);
|
m_hostSessionList->SetPasswordForHost(GetImapServerKey(), nsnull);
|
||||||
m_currentBiffState = nsIMsgFolder::nsMsgBiffState_Unknown;
|
m_currentBiffState = nsIMsgFolder::nsMsgBiffState_Unknown;
|
||||||
SendSetBiffIndicatorEvent(m_currentBiffState);
|
SendSetBiffIndicatorEvent(m_currentBiffState);
|
||||||
|
password.Truncate();
|
||||||
} // if we didn't receive the death signal...
|
} // if we didn't receive the death signal...
|
||||||
} // if login failed
|
} // if login failed
|
||||||
else // login succeeded
|
else // login succeeded
|
||||||
@ -7228,19 +7229,24 @@ nsImapMockChannel::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry, nsCache
|
|||||||
// use a stream listener Tee to force data into the cache and to our current channel listener...
|
// use a stream listener Tee to force data into the cache and to our current channel listener...
|
||||||
nsCOMPtr<nsIStreamListener> newListener;
|
nsCOMPtr<nsIStreamListener> newListener;
|
||||||
nsCOMPtr<nsIStreamListenerTee> tee = do_CreateInstance(kStreamListenerTeeCID, &rv);
|
nsCOMPtr<nsIStreamListenerTee> tee = do_CreateInstance(kStreamListenerTeeCID, &rv);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
if (NS_SUCCEEDED(rv))
|
||||||
|
{
|
||||||
|
|
||||||
nsCOMPtr<nsITransport> transport;
|
nsCOMPtr<nsITransport> transport;
|
||||||
rv = entry->GetTransport(getter_AddRefs(transport));
|
rv = entry->GetTransport(getter_AddRefs(transport));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_SUCCEEDED(rv))
|
||||||
|
{
|
||||||
nsCOMPtr<nsIOutputStream> out;
|
nsCOMPtr<nsIOutputStream> out;
|
||||||
|
// this will fail with the mem cache turned off, so we need to fall through
|
||||||
|
// to ReadFromImapConnection instead of aborting with NS_ENSURE_SUCCESS(rv,rv)
|
||||||
rv = transport->OpenOutputStream(0, PRUint32(-1), 0, getter_AddRefs(out));
|
rv = transport->OpenOutputStream(0, PRUint32(-1), 0, getter_AddRefs(out));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
if (NS_SUCCEEDED(rv))
|
||||||
|
{
|
||||||
rv = tee->Init(m_channelListener, out);
|
rv = tee->Init(m_channelListener, out);
|
||||||
m_channelListener = do_QueryInterface(tee);
|
m_channelListener = do_QueryInterface(tee);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3429,7 +3429,9 @@ NS_IMETHODIMP nsImapService::NewChannel(nsIURI *aURI, nsIChannel **_retval)
|
|||||||
if (aFolder)
|
if (aFolder)
|
||||||
aFolder->GetParent(getter_AddRefs(parent));
|
aFolder->GetParent(getter_AddRefs(parent));
|
||||||
}
|
}
|
||||||
if (!parent && !folderName.IsEmpty())
|
// if we couldn't get the fullFolderName, then we probably couldn't find
|
||||||
|
// the other user's namespace, in which case, we shouldn't try to subscribe to it.
|
||||||
|
if (!parent && !folderName.IsEmpty() && fullFolderName)
|
||||||
{
|
{
|
||||||
// this folder doesn't exist - check if the user wants to subscribe to this folder.
|
// this folder doesn't exist - check if the user wants to subscribe to this folder.
|
||||||
nsCOMPtr<nsIPrompt> dialog;
|
nsCOMPtr<nsIPrompt> dialog;
|
||||||
|
Loading…
Reference in New Issue
Block a user