evolution-data-server r9238 - trunk/camel/providers/imap



Author: sragavan
Date: Thu Jul 31 10:32:41 2008
New Revision: 9238
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9238&view=rev

Log:
2008-07-31  Srinivasa Ragavan  <sragavan novell com>

	* camel/providers/imap/camel-imap-folder.c: Fix a case, where the info
	isn't synced to the db, but only to the server.


Modified:
   trunk/camel/providers/imap/ChangeLog
   trunk/camel/providers/imap/camel-imap-folder.c

Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c	(original)
+++ trunk/camel/providers/imap/camel-imap-folder.c	Thu Jul 31 10:32:41 2008
@@ -1308,9 +1308,10 @@
 		   think?). -- Jeff */
 		matches = get_matching (folder, info->info.flags & (folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED),
 					folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED, (CamelMessageInfo *)info, &set, summary);
-		camel_message_info_free(info);
-		if (matches == NULL)
+		if (matches == NULL) {
+			camel_message_info_free(info);
 			continue;
+		}
 		
 		/* Make sure we're connected before issuing commands */
 		if (!camel_imap_store_connected(store, ex)) {
@@ -1320,6 +1321,9 @@
 
 		flaglist = imap_create_flag_list (info->info.flags & folder->permanent_flags, (CamelMessageInfo *)info, folder->permanent_flags);
 
+		/* We don't use the info any more */
+		camel_message_info_free(info);
+
 		if (strcmp (flaglist, "()") == 0) {
 			/* Note: Cyrus is broken and will not accept an
 			   empty-set of flags so... if this is true then we
@@ -1355,6 +1359,7 @@
 				info = matches->pdata[j];
 				info->info.flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
 				((CamelImapMessageInfo *) info)->server_flags =	info->info.flags & CAMEL_IMAP_SERVER_FLAGS;
+				info->info.dirty = TRUE; /* Sync it back to the DB */
 			}
 			camel_folder_summary_touch (folder->summary);
 		}



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