зеркало из https://github.com/mozilla/pjs.git
fix problems with biff and cleanup inbox on exit with SSL, r=naving, sr=mscott 90767 58964
This commit is contained in:
Родитель
62aea5cb6b
Коммит
a7bd2338ab
|
@ -918,12 +918,16 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
|||
if (folder)
|
||||
{
|
||||
nsXPIDLCString passwd;
|
||||
PRBool serverRequiresPasswordForAuthentication = PR_TRUE;
|
||||
PRBool isImap = (type ? PL_strcmp(type, "imap") == 0 :
|
||||
PR_FALSE);
|
||||
if (isImap)
|
||||
{
|
||||
server->GetServerRequiresPasswordForBiff(&serverRequiresPasswordForAuthentication);
|
||||
server->GetPassword(getter_Copies(passwd));
|
||||
if (!isImap || (isImap && passwd &&
|
||||
nsCRT::strlen((const char*) passwd)))
|
||||
}
|
||||
if (!isImap || (isImap && (!serverRequiresPasswordForAuthentication || (passwd &&
|
||||
nsCRT::strlen((const char*) passwd)))))
|
||||
{
|
||||
nsCOMPtr<nsIUrlListener> urlListener;
|
||||
NS_WITH_SERVICE(nsIMsgAccountManager, accountManager,
|
||||
|
@ -979,7 +983,7 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
|||
{
|
||||
accountManager->GetCleanupInboxInProgress(&inProgress);
|
||||
PR_CEnterMonitor(folder);
|
||||
PR_CWait(folder, 1000UL);
|
||||
PR_CWait(folder, PR_MicrosecondsToInterval(1000UL));
|
||||
PR_CExitMonitor(folder);
|
||||
if (eventQueue)
|
||||
eventQueue->ProcessPendingEvents();
|
||||
|
@ -992,7 +996,7 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
|||
{
|
||||
accountManager->GetEmptyTrashInProgress(&inProgress);
|
||||
PR_CEnterMonitor(folder);
|
||||
PR_CWait(folder, 1000UL);
|
||||
PR_CWait(folder, PR_MicrosecondsToInterval(1000UL));
|
||||
PR_CExitMonitor(folder);
|
||||
if (eventQueue)
|
||||
eventQueue->ProcessPendingEvents();
|
||||
|
|
|
@ -46,7 +46,7 @@ interface nsIImapServerSink : nsISupports {
|
|||
void fEAlertFromServer(in string aString, in nsIMsgWindow aMsgWindow);
|
||||
void commitNamespaces();
|
||||
void promptForPassword(out string aString, in nsIMsgWindow aMsgWindow);
|
||||
void setUserAuthenticated(in boolean authenticated);
|
||||
attribute boolean userAuthenticated;
|
||||
void setMailServerUrls(in string manageMailAccount, in string manageLists, in string manageFilters);
|
||||
|
||||
/* this is a bogus method on this interface but i need it until misc. sink is scriptable.. */
|
||||
|
|
|
@ -106,6 +106,7 @@ nsImapIncomingServer::nsImapIncomingServer()
|
|||
mDoingSubscribeDialog = PR_FALSE;
|
||||
mDoingLsub = PR_FALSE;
|
||||
m_canHaveFilters = PR_TRUE;
|
||||
m_userAuthenticated = PR_FALSE;
|
||||
m_readPFCName = PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -2143,6 +2144,15 @@ nsresult nsImapIncomingServer::GetUnverifiedSubFolders(nsIFolder *parentFolder,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapIncomingServer::GetServerRequiresPasswordForBiff(PRBool *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
// if the user has already been authenticated, we've got the password
|
||||
*_retval = !m_userAuthenticated;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsImapIncomingServer::PromptForPassword(char ** aPassword,
|
||||
nsIMsgWindow * aMsgWindow)
|
||||
{
|
||||
|
@ -2283,10 +2293,7 @@ void MSG_IMAPFolderInfoMail::ResetNamespaceReferences()
|
|||
|
||||
#endif //FINISHED_PORTED_NAMESPACE_STUFF
|
||||
|
||||
NS_IMETHODIMP nsImapIncomingServer::SetUserAuthenticated(PRBool authenticated)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMPL_GETSET(nsImapIncomingServer, UserAuthenticated, PRBool, m_userAuthenticated);
|
||||
|
||||
/* void SetMailServerUrls (in string manageMailAccount, in string manageLists, in string manageFilters); */
|
||||
NS_IMETHODIMP nsImapIncomingServer::SetMailServerUrls(const char *manageMailAccount, const char *manageLists, const char *manageFilters)
|
||||
|
|
|
@ -71,6 +71,7 @@ public:
|
|||
NS_IMETHOD GetCanFileMessagesOnServer(PRBool *aCanFileMessagesOnServer);
|
||||
NS_IMETHOD GetFilterScope(nsMsgSearchScopeValue *filterScope);
|
||||
NS_IMETHOD GetSearchScope(nsMsgSearchScopeValue *searchScope);
|
||||
NS_IMETHOD GetServerRequiresPasswordForBiff(PRBool *_retval);
|
||||
protected:
|
||||
nsresult GetFolder(const char* name, nsIMsgFolder** pFolder);
|
||||
nsresult ResetFoldersToUnverified(nsIFolder *parentFolder);
|
||||
|
@ -105,6 +106,7 @@ private:
|
|||
PRUint32 m_capability;
|
||||
nsCString m_manageMailAccountUrl;
|
||||
PRBool m_readPFCName;
|
||||
PRBool m_userAuthenticated;
|
||||
nsCString m_pfcName;
|
||||
PRBool m_waitingForConnectionInfo;
|
||||
PRInt32 m_redirectedLogonRetries;
|
||||
|
|
Загрузка…
Ссылка в новой задаче