aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-folder.c14
2 files changed, 16 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index bc6747e81f..0a60f67c1f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-03 Not Zed <NotZed@Ximian.com>
+
+ * camel-folder.c (folder_changed): Dont get the filter driver
+ inside the change_lock. Its not necessary, and can cause deadlock
+ with the way the mailer gets the filter driver via g_mainloop.
+ Should fix #31572.
+
2002-10-02 Jeffrey Stedfast <fejj@ximian.com>
* camel-charset-map.c (camel_charset_iso_to_windows): Map us-ascii
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index a374e1a8d5..8b121d5d75 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1600,19 +1600,22 @@ folder_changed (CamelObject *obj, gpointer event_data)
if (changed != NULL) {
CamelSession *session = ((CamelService *)folder->parent_store)->session;
- CamelFilterDriver *driver;
+ CamelFilterDriver *driver = NULL;
- CAMEL_FOLDER_LOCK(folder, change_lock);
if ((folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT)
- && changed->uid_recent->len>0
- && (driver = camel_session_get_filter_driver(session, "incoming", NULL))) {
+ && changed->uid_recent->len > 0)
+ driver = camel_session_get_filter_driver(session, "incoming", NULL);
+
+ CAMEL_FOLDER_LOCK(folder, change_lock);
+
+ if (driver) {
#ifdef ENABLE_THREADS
GPtrArray *recents = g_ptr_array_new();
int i;
struct _folder_filter_msg *msg;
d(printf("** Have '%d' recent messages, launching thread to process them\n", changed->uid_recent->len));
-
+
folder->priv->frozen++;
msg = camel_session_thread_msg_new(session, &filter_ops, sizeof(*msg));
for (i=0;i<changed->uid_recent->len;i++)
@@ -1636,6 +1639,7 @@ folder_changed (CamelObject *obj, gpointer event_data)
thaw(), but thats a pita */
g_ptr_array_set_size(changed->uid_recent, 0);
}
+
if (folder->priv->frozen) {
camel_folder_change_info_cat(folder->priv->changed_frozen, changed);
ret = FALSE;