From eb78a3bf04bc0886fc4401cf14dfc210461ebd2c Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Thu, 31 Jul 2008 10:32:41 +0000 Subject: [PATCH] Fix a case, where the info isn't synced to the db, but only to the server. 2008-07-31 Srinivasa Ragavan * camel/providers/imap/camel-imap-folder.c: Fix a case, where the info isn't synced to the db, but only to the server. svn path=/trunk/; revision=9238 --- camel/providers/imap/ChangeLog | 5 +++++ camel/providers/imap/camel-imap-folder.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/camel/providers/imap/ChangeLog b/camel/providers/imap/ChangeLog index 31028c4..0ac5834 100644 --- a/camel/providers/imap/ChangeLog +++ b/camel/providers/imap/ChangeLog @@ -1,5 +1,10 @@ 2008-07-31 Srinivasa Ragavan + * camel/providers/imap/camel-imap-folder.c: Fix a case, where the info + isn't synced to the db, but only to the server. + +2008-07-31 Srinivasa Ragavan + ** Fix for bug #545081 * camel/providers/imap/camel-imap-message-cache.c: Add a new simple diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 2475923..b82d65f 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1308,9 +1308,10 @@ imap_sync_online (CamelFolder *folder, CamelException *ex) 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 @@ imap_sync_online (CamelFolder *folder, CamelException *ex) 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 @@ imap_sync_online (CamelFolder *folder, CamelException *ex) 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); } -- 2.7.4