patch for bug 234908 "getter_Copies scoping problem" r+sr=bienvenu

This commit is contained in:
darin%meer.net 2004-03-05 18:54:14 +00:00
Родитель 3b48198123
Коммит e1a68dd7f0
3 изменённых файлов: 16 добавлений и 14 удалений

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

@ -195,7 +195,7 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
} // if rest && *rest
nsCOMPtr<nsIMimeConverter> mimeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID);
nsXPIDLCString decodedString;
char *decodedString;
// Now unescape any fields that need escaped...
if (!m_toPart.IsEmpty())
@ -204,10 +204,10 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
if (mimeConverter)
{
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_toPart.get(),
getter_Copies(decodedString),
&decodedString,
"UTF-8", PR_FALSE))
&& decodedString)
m_toPart = decodedString;
m_toPart.Adopt(decodedString);
}
}
if (!m_ccPart.IsEmpty())
@ -216,10 +216,10 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
if (mimeConverter)
{
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_ccPart.get(),
getter_Copies(decodedString),
&decodedString,
"UTF-8", PR_FALSE))
&& decodedString)
m_ccPart = decodedString;
m_ccPart.Adopt(decodedString);
}
}
if (!m_subjectPart.IsEmpty())
@ -228,10 +228,10 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
if (mimeConverter)
{
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_subjectPart.get(),
getter_Copies(decodedString),
&decodedString,
"UTF-8", PR_FALSE))
&& decodedString)
m_subjectPart = decodedString;
m_subjectPart.Adopt(decodedString);
}
}
if (!m_newsgroupPart.IsEmpty())
@ -244,11 +244,11 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
if (mimeConverter)
{
if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeader(m_bodyPart.get(),
getter_Copies(decodedString),
&decodedString,
"UTF-8", PR_FALSE,
PR_FALSE))
&& decodedString)
m_bodyPart = decodedString;
m_bodyPart.Adopt(decodedString);
}
}
if (!m_newsHostPart.IsEmpty())

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

@ -1749,9 +1749,11 @@ NS_IMETHODIMP nsImapIncomingServer::DiscoveryDone()
for (PRUint32 i = 0; i < numFolders; i++)
{
nsXPIDLString folderName;
if (NS_SUCCEEDED(trashFolders[i]->GetName(getter_Copies(folderName))) &&
!folderName.Equals(trashName))
if (NS_SUCCEEDED(trashFolders[i]->GetName(getter_Copies(folderName))))
{
if (!folderName.Equals(trashName))
trashFolders[i]->ClearFlag(MSG_FOLDER_FLAG_TRASH);
}
NS_RELEASE(trashFolders[i]);
}

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

@ -4084,9 +4084,9 @@ nsresult nsImapMailFolder::SyncFlags(nsIImapFlagAndUidState *flagState)
if (flags & kImapMsgCustomKeywordFlag)
{
nsXPIDLCString keywords;
if (NS_SUCCEEDED(flagState->GetCustomFlags(uidOfMessage, getter_Copies(keywords))) && !keywords.IsEmpty())
if (NS_SUCCEEDED(flagState->GetCustomFlags(uidOfMessage, getter_Copies(keywords))))
{
if (dbHdr && NS_SUCCEEDED(rv))
if (!keywords.IsEmpty() && dbHdr && NS_SUCCEEDED(rv))
{
HandleCustomFlags(uidOfMessage, dbHdr, keywords);
}