[evolution-data-server] Bug #550414 - Corruption of mailbox and can't expunge trash
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #550414 - Corruption of mailbox and can't expunge trash
- Date: Mon, 7 Jun 2010 08:03:56 +0000 (UTC)
commit 9da96c2ac4e149ca8d04140442dee29b93fb1742
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 7 10:03:21 2010 +0200
Bug #550414 - Corruption of mailbox and can't expunge trash
camel/providers/local/camel-mbox-summary.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index df1286f..36f5ad4 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -818,6 +818,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
camel_mime_parser_scan_pre_from(mp, TRUE);
camel_mime_parser_init_with_fd(mp, pfd);
+ camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
/* Sync only the changes */
summary = camel_folder_summary_get_changed ((CamelFolderSummary *)mbs);
if (summary->len)
@@ -920,6 +921,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
g_object_unref (mp);
camel_operation_end(NULL);
+ camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
return 0;
error:
@@ -933,6 +935,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
camel_message_info_free((CamelMessageInfo *)info);
camel_operation_end(NULL);
+ camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
return -1;
}
@@ -1055,6 +1058,7 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
camel_mime_parser_scan_pre_from(mp, TRUE);
camel_mime_parser_init_with_fd(mp, fd);
+ camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
camel_folder_summary_prepare_fetch_all (s, ex);
count = camel_folder_summary_count(s);
for (i = 0; i < count; i++) {
@@ -1229,6 +1233,8 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
if (touched)
camel_folder_summary_header_save_to_db (s, ex);
+ camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
+
return 0;
error:
g_free(xevnew);
@@ -1238,6 +1244,8 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
if (info)
camel_message_info_free((CamelMessageInfo *)info);
+ camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
+
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]