diff --git a/thunderbird-436533.patch b/thunderbird-436533.patch new file mode 100644 index 0000000..fd331de --- /dev/null +++ b/thunderbird-436533.patch @@ -0,0 +1,99 @@ +diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp +--- a/mailnews/imap/src/nsImapIncomingServer.cpp ++++ b/mailnews/imap/src/nsImapIncomingServer.cpp +@@ -2255,35 +2259,39 @@ nsImapIncomingServer::OnStopRunningUrl(n + NS_ENSURE_SUCCESS(rv, rv); + break; + case nsIImapUrl::nsImapDiscoverAllBoxesUrl: + if (NS_SUCCEEDED(exitCode)) + DiscoveryDone(); + break; + case nsIImapUrl::nsImapFolderStatus: + { +- PRInt32 folderCount = m_foldersToStat.Count(); +- nsCOMPtr msgFolder( +- do_QueryInterface(m_foldersToStat[folderCount - 1])); ++ nsCOMPtr msgFolder; ++ nsCOMPtr mailUrl = do_QueryInterface(imapUrl); ++ mailUrl->GetFolder(getter_AddRefs(msgFolder)); + if (msgFolder) + { + nsresult rv; + nsCOMPtr session = + do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv); + NS_ENSURE_SUCCESS(rv, rv); + PRBool folderOpen; + rv = session->IsFolderOpenInWindow(msgFolder, &folderOpen); + if (NS_SUCCEEDED(rv) && !folderOpen && msgFolder) + msgFolder->SetMsgDatabase(nsnull); ++ nsCOMPtr imapFolder = do_QueryInterface(msgFolder); ++ m_foldersToStat.RemoveObject(imapFolder); + } +- m_foldersToStat.RemoveObjectAt(folderCount - 1); +- // This should be done on a timeout, since we shouldn't start a new url +- // from here. +- if (folderCount > 1) +- m_foldersToStat[folderCount - 2]->UpdateStatus(this, nsnull); ++ // if we get an error running the url, it's better ++ // not to chain the next url. ++ if (NS_FAILED(exitCode)) ++ m_foldersToStat.Clear(); ++ if (m_foldersToStat.Count() > 0) ++ m_foldersToStat[0]->UpdateStatus(this, nsnull); ++ break; + } + default: + break; + } + } + return NS_OK; + } + +@@ -2927,19 +2935,19 @@ nsImapIncomingServer::GetNewMessagesForN + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); + if(prefBranch) + prefBranch->GetBoolPref("mail.imap.use_status_for_biff", &gUseStatus); + gGotStatusPref = PR_TRUE; + } + if (gUseStatus && !isOpen) + { + nsCOMPtr imapFolder = do_QueryInterface(aFolder); +- if (imapFolder && !isServer) ++ if (imapFolder && !isServer && ++ m_foldersToStat.IndexOf(imapFolder) == -1) + m_foldersToStat.AppendObject(imapFolder); +- //imapFolder->UpdateStatus(this, nsnull /* aWindow - null window will prevent alerts */); + } + else + aFolder->UpdateFolder(aWindow); + } + + // Loop through all subfolders to get new messages for them. + nsCOMPtr enumerator; + nsresult rv = aFolder->GetSubFolders(getter_AddRefs(enumerator)); +@@ -2956,23 +2964,18 @@ nsImapIncomingServer::GetNewMessagesForN + if (!msgFolder) + { + NS_WARNING("Not an nsIMsgFolder"); + continue; + } + GetNewMessagesForNonInboxFolders(msgFolder, aWindow, forceAllFolders, + performingBiff); + } +- +- if (isServer) +- { +- PRInt32 folderCount = m_foldersToStat.Count(); +- if (folderCount > 0) +- m_foldersToStat[folderCount - 1]->UpdateStatus(this, nsnull); +- } ++ if (isServer && m_foldersToStat.Count() > 0) ++ m_foldersToStat[0]->UpdateStatus(this, nsnull); + return NS_OK; + } + + NS_IMETHODIMP + nsImapIncomingServer::GetArbitraryHeaders(nsACString &aResult) + { + nsCOMPtr filterList; + nsresult rv = GetFilterList(nsnull, getter_AddRefs(filterList)); diff --git a/thunderbird.spec b/thunderbird.spec index b9000d3..fe26665 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -24,7 +24,7 @@ Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird Version: 3.0.4 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -61,6 +61,8 @@ Patch0: thunderbird-version.patch Patch1: mozilla-jemalloc.patch # Fix for installation fail when building with dynamic linked libraries Patch2: thunderbird-shared-error.patch +# Fix for crash mozbz#550455, remove when 3.0.5 +Patch3: thunderbird-436533.patch %if %{official_branding} # Required by Mozilla Corporation @@ -119,6 +121,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \ %patch1 -p0 -b .jemalloc %patch2 -p1 -b .shared-error +%patch3 -p1 -b .436533 %if %{official_branding} # Required by Mozilla Corporation @@ -380,6 +383,9 @@ fi #=============================================================================== %changelog +* Fri Apr 30 2010 Jan Horak - 3.0.4-2 +- Fix for mozbz#550455 + * Tue Mar 30 2010 Jan Horak - 3.0.4-1 - Update to 3.0.4