зеркало из https://github.com/mozilla/pjs.git
fix cancelling from imap password prompt r=sspitzer, sr=mscott 111071
This commit is contained in:
Родитель
073bc38e35
Коммит
57ea334a8e
|
@ -105,6 +105,8 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MAILNEWS, value)
|
||||||
#define NS_MSG_FAILED(err) \
|
#define NS_MSG_FAILED(err) \
|
||||||
(NS_IS_MSG_ERROR(err) && NS_FAILED(err))
|
(NS_IS_MSG_ERROR(err) && NS_FAILED(err))
|
||||||
|
|
||||||
|
#define NS_MSG_PASSWORD_PROMPT_CANCELLED NS_MSG_GENERATE_SUCCESS(1)
|
||||||
|
|
||||||
/* is this where we define our errors? Obviously, there has to be a central
|
/* is this where we define our errors? Obviously, there has to be a central
|
||||||
place so we don't use the same error codes.
|
place so we don't use the same error codes.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2218,7 +2218,7 @@ NS_IMETHODIMP nsImapIncomingServer::PromptForPassword(char ** aPassword,
|
||||||
nsresult rv = GetPasswordWithUI(passwordText, passwordTitle, aMsgWindow,
|
nsresult rv = GetPasswordWithUI(passwordText, passwordTitle, aMsgWindow,
|
||||||
&okayValue, aPassword);
|
&okayValue, aPassword);
|
||||||
nsTextFormatter::smprintf_free(passwordText);
|
nsTextFormatter::smprintf_free(passwordText);
|
||||||
return rv;
|
return (okayValue) ? rv : NS_MSG_PASSWORD_PROMPT_CANCELLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for the nsIImapServerSink interface
|
// for the nsIImapServerSink interface
|
||||||
|
|
|
@ -6564,7 +6564,9 @@ PRBool nsImapProtocol::TryToLogon()
|
||||||
rv = GetMsgWindow(getter_AddRefs(aMsgWindow));
|
rv = GetMsgWindow(getter_AddRefs(aMsgWindow));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
}
|
}
|
||||||
m_imapServerSink->PromptForPassword(getter_Copies(password), aMsgWindow);
|
rv = m_imapServerSink->PromptForPassword(getter_Copies(password), aMsgWindow);
|
||||||
|
if (rv == NS_MSG_PASSWORD_PROMPT_CANCELLED)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
PRBool imapPasswordIsNew = PR_FALSE;
|
PRBool imapPasswordIsNew = PR_FALSE;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче