summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-08-21 08:37:29 +0200
committerMilan Crha <mcrha@redhat.com>2009-08-21 08:37:29 +0200
commit03f4c1c3f8d0f88b49029d99efa8fd29ca869548 (patch)
tree0571331d6b678d98a97ea7afbd366394a95b2934
parent124e69bc9a5c0092bdd2c8fc619ddc1bb1e3a659 (diff)
downloadevolution-data-server-03f4c1c3f8d0f88b49029d99efa8fd29ca869548.tar.gz
Bug #592310 - Deadlock in maildir provider after doing expunge
-rw-r--r--camel/camel-folder-summary.c4
-rw-r--r--camel/providers/local/camel-maildir-folder.c7
-rw-r--r--camel/providers/local/camel-mh-folder.c7
3 files changed, 3 insertions, 15 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 778b14311..baf398b48 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -3488,7 +3488,9 @@ message_info_free(CamelFolderSummary *s, CamelMessageInfo *info)
CamelMessageInfoBase *mi = (CamelMessageInfoBase *)info;
if (mi->uid) {
- g_hash_table_remove (s->loaded_infos, mi->uid);
+ if (g_hash_table_lookup (s->loaded_infos, mi->uid) == mi) {
+ g_hash_table_remove (s->loaded_infos, mi->uid);
+ }
camel_pstring_free(mi->uid);
}
camel_pstring_free(mi->subject);
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index 3279f1fbe..a8c4b28cf 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -179,9 +179,6 @@ maildir_append_message (CamelFolder *folder, CamelMimeMessage *message, const Ca
if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, ex) == -1)
return;
- if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1)
- goto check_changed;
-
/* add it to the summary/assign the uid, etc */
mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex);
if (camel_exception_is_set (ex))
@@ -287,10 +284,6 @@ maildir_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex
if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, ex) == -1)
return NULL;
- if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1) {
- goto fail;
- }
-
/* get the message summary info */
if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c
index e10f6aaa9..d4f27799e 100644
--- a/camel/providers/local/camel-mh-folder.c
+++ b/camel/providers/local/camel-mh-folder.c
@@ -139,9 +139,6 @@ mh_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMe
if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, ex) == -1)
return;
- if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1)
- goto check_changed;
-
/* add it to the summary/assign the uid, etc */
mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex);
if (camel_exception_is_set (ex))
@@ -222,10 +219,6 @@ static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid,
if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, ex) == -1)
return NULL;
- if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1) {
- goto fail;
- }
-
/* get the message summary info */
if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,