Fix for 107466. Reset msg uid in server state parser before calling 'foundShell->Generate()' because the uid may have been used by newly arrived mail. r=naving, sr=bienvenu, a=asa.

This commit is contained in:
cavin%netscape.com 2002-06-06 21:44:27 +00:00
Родитель 7be406b881
Коммит fdb2c6483e
3 изменённых файлов: 11 добавлений и 0 удалений

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

@ -1875,6 +1875,8 @@ void nsImapProtocol::ProcessSelectedStateURL()
SetContentModified(modType);
foundShell->SetConnection(this);
GetServerStateParser().UseCachedShell(foundShell);
//Set the current uid in server state parser (in case it was used for new mail msgs earlier).
GetServerStateParser().SetCurrentResponseUID((PRUint32)atoi(messageIdString));
foundShell->Generate(imappart);
GetServerStateParser().UseCachedShell(NULL);
}
@ -1934,6 +1936,8 @@ void nsImapProtocol::ProcessSelectedStateURL()
//PR_LOG(IMAP, out, ("BODYSHELL: Loading message, using cached shell."));
foundShell->SetConnection(this);
GetServerStateParser().UseCachedShell(foundShell);
//Set the current uid in server state parser (in case it was used for new mail msgs earlier).
GetServerStateParser().SetCurrentResponseUID((PRUint32)atoi(messageIdString));
foundShell->Generate(NULL);
GetServerStateParser().UseCachedShell(NULL);
}

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

@ -2553,6 +2553,12 @@ PRInt32 nsImapServerResponseParser::FolderUID()
return fFolderUIDValidity;
}
void nsImapServerResponseParser::SetCurrentResponseUID(PRUint32 uid)
{
if (uid > 0)
fCurrentResponseUID = uid;
}
PRUint32 nsImapServerResponseParser::CurrentResponseUID()
{
return fCurrentResponseUID;

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

@ -99,6 +99,7 @@ public:
PRInt32 FolderUID();
PRUint32 CurrentResponseUID();
PRUint32 HighestRecordedUID();
void SetCurrentResponseUID(PRUint32 uid);
void CopyResponseUID(nsMsgKeyArray& keyArray);
void ClearCopyResponseUID();
PRBool IsNumericString(const char *string);