fix for bug #190044. too many status messages for
pop3, nntp, and smtp. just do what darin did for imap. thanks to kazhik@mozilla.gr.jp for the initial patch. r=cavin, sr=bienvenu
This commit is contained in:
Родитель
5df8ac3e9a
Коммит
b476245325
|
@ -669,16 +669,21 @@ NS_IMETHODIMP
|
|||
nsMsgProtocol::OnTransportStatus(nsITransport *transport, nsresult status,
|
||||
PRUint32 progress, PRUint32 progressMax)
|
||||
{
|
||||
if (mProgressEventSink && !(mLoadFlags & LOAD_BACKGROUND)) {
|
||||
nsCAutoString host;
|
||||
if (m_url)
|
||||
m_url->GetHost(host);
|
||||
mProgressEventSink->OnStatus(this, nsnull, status, NS_ConvertUTF8toUCS2(host).get());
|
||||
if (mProgressEventSink && !(mLoadFlags & LOAD_BACKGROUND))
|
||||
{
|
||||
// these transport events should not generate any status messages
|
||||
if (status == nsISocketTransport::STATUS_RECEIVING_FROM ||
|
||||
status == nsISocketTransport::STATUS_SENDING_TO ||
|
||||
status == nsITransport::STATUS_READING ||
|
||||
status == nsITransport::STATUS_WRITING)
|
||||
status == nsISocketTransport::STATUS_SENDING_TO)
|
||||
{
|
||||
mProgressEventSink->OnProgress(this, nsnull, progress, progressMax);
|
||||
}
|
||||
else
|
||||
{
|
||||
nsCAutoString host;
|
||||
if (m_url)
|
||||
m_url->GetHost(host);
|
||||
mProgressEventSink->OnStatus(this, nsnull, status, NS_ConvertUTF8toUCS2(host).get());
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче