rpms/thunderbird/F-13 thunderbird-436533.patch, NONE, 1.1 thunderbird.spec, 1.165, 1.166

Jan Horak xhorak at fedoraproject.org
Fri Apr 30 09:13:25 UTC 2010


Author: xhorak

Update of /cvs/pkgs/rpms/thunderbird/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv31164

Modified Files:
	thunderbird.spec 
Added Files:
	thunderbird-436533.patch 
Log Message:
Fix for mozbz#550455

thunderbird-436533.patch:
 nsImapIncomingServer.cpp |   33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

--- NEW FILE thunderbird-436533.patch ---
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<nsIMsgFolder> msgFolder(
-          do_QueryInterface(m_foldersToStat[folderCount - 1]));
+      nsCOMPtr<nsIMsgFolder> msgFolder;
+      nsCOMPtr<nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(imapUrl);
+      mailUrl->GetFolder(getter_AddRefs(msgFolder));
       if (msgFolder)
       {
         nsresult rv;
         nsCOMPtr<nsIMsgMailSession> 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<nsIMsgImapMailFolder> 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<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
       if(prefBranch)
         prefBranch->GetBoolPref("mail.imap.use_status_for_biff", &gUseStatus);
       gGotStatusPref = PR_TRUE;
     }
     if (gUseStatus && !isOpen)
     {
       nsCOMPtr <nsIMsgImapMailFolder> 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<nsISimpleEnumerator> 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 <nsIMsgFilterList> filterList;
   nsresult rv = GetFilterList(nsnull, getter_AddRefs(filterList));


Index: thunderbird.spec
===================================================================
RCS file: /cvs/pkgs/rpms/thunderbird/F-13/thunderbird.spec,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -p -r1.165 -r1.166
--- thunderbird.spec	13 Apr 2010 10:11:26 -0000	1.165
+++ thunderbird.spec	30 Apr 2010 09:13:24 -0000	1.166
@@ -24,7 +24,7 @@
 Summary:        Mozilla Thunderbird mail/newsgroup client
 Name:           thunderbird
 Version:        3.0.4
-Release:        2%{?dist}
+Release:        3%{?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.patc
 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
@@ -150,6 +152,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{ver
 
 %patch1 -p0 -b .jemalloc
 %patch2 -p1 -b .shared-error
+%patch3 -p1 -b .436533
 
 %if %{official_branding}
 # Required by Mozilla Corporation
@@ -431,6 +434,9 @@ fi
 #===============================================================================
 
 %changelog
+* Fri Apr 30 2010 Jan Horak <jhorak at redhat.com> - 3.0.4-3
+- Fix for mozbz#550455
+
 * Tue Apr 13 2010 Martin Stransky <stransky at redhat.com> - 3.0.4-2
 - Fixed langpacks (#580444)
 



More information about the scm-commits mailing list