evolution-data-server r9586 - in branches/eds-dbus: . camel/providers/imap



Author: rburton
Date: Mon Sep 22 14:53:53 2008
New Revision: 9586
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9586&view=rev

Log:
Merged revisions 9544 via svnmerge from 
svn+ssh://rburton svn gnome org/svn/evolution-data-server/trunk

........
  r9544 | pchen | 2008-09-14 08:14:28 +0100 (Sun, 14 Sep 2008) | 1 line
  
  Fixes a infinite loop while expunging the folders.
........


Modified:
   branches/eds-dbus/   (props changed)
   branches/eds-dbus/camel/providers/imap/ChangeLog
   branches/eds-dbus/camel/providers/imap/camel-imap-folder.c
   branches/eds-dbus/camel/providers/imap/camel-imap-journal.h

Modified: branches/eds-dbus/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- branches/eds-dbus/camel/providers/imap/camel-imap-folder.c	(original)
+++ branches/eds-dbus/camel/providers/imap/camel-imap-folder.c	Mon Sep 22 14:53:53 2008
@@ -278,6 +278,7 @@
 	}
 
 	imap_folder->search = camel_imap_search_new(folder_dir);
+	
 	camel_offline_journal_replay (imap_folder->journal, ex);
 	camel_imap_journal_close_folders ((CamelIMAPJournal *)imap_folder->journal);
 	camel_offline_journal_write (CAMEL_IMAP_FOLDER (folder)->journal, ex);
@@ -1282,6 +1283,7 @@
 {
 	CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
 	CamelImapMessageInfo *info;
+	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
 	CamelException local_ex;
 
 	GPtrArray *matches, *summary;
@@ -1414,9 +1416,16 @@
 	if (expunge)
 		imap_expunge (folder, ex);
 
-	camel_offline_journal_replay (CAMEL_IMAP_FOLDER (folder)->journal, ex);
-	camel_imap_journal_close_folders ((CamelIMAPJournal *) CAMEL_IMAP_FOLDER (folder)->journal);
-	camel_offline_journal_write (CAMEL_IMAP_FOLDER (folder)->journal, ex);
+	/* Check if the replay is already in progress as imap_sync would be called while expunge resync */
+	if (!CAMEL_IMAP_JOURNAL (imap_folder->journal)->rp_in_progress) {
+		CAMEL_IMAP_JOURNAL (imap_folder->journal)->rp_in_progress = TRUE;
+	
+		camel_offline_journal_replay (imap_folder->journal, ex);
+		camel_imap_journal_close_folders ((CamelIMAPJournal *)imap_folder->journal);
+		camel_offline_journal_write (CAMEL_IMAP_FOLDER (folder)->journal, ex);
+
+		CAMEL_IMAP_JOURNAL (imap_folder->journal)->rp_in_progress = FALSE;
+	}
 
 	g_ptr_array_foreach (summary, (GFunc) camel_pstring_free, NULL);
 	g_ptr_array_free (summary, TRUE);

Modified: branches/eds-dbus/camel/providers/imap/camel-imap-journal.h
==============================================================================
--- branches/eds-dbus/camel/providers/imap/camel-imap-journal.h	(original)
+++ branches/eds-dbus/camel/providers/imap/camel-imap-journal.h	Mon Sep 22 14:53:53 2008
@@ -70,6 +70,7 @@
 
 	GHashTable *folders;
 	GHashTable *uidmap;	
+	gboolean rp_in_progress;
 };
 
 struct _CamelIMAPJournalClass {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]