diff options
author | Not Zed <NotZed@Ximian.com> | 2002-10-04 11:00:23 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-10-04 11:00:23 +0800 |
commit | a2db8a30c8e384371c37c7396246505aa54fb58e (patch) | |
tree | ff5553f65cc646d7d97318d26cb91a7af2ac06d8 | |
parent | 9420fa7f8241d6eb25f69af5189929f6d9f37dc0 (diff) | |
download | gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.tar gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.tar.gz gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.tar.bz2 gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.tar.lz gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.tar.xz gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.tar.zst gsoc2013-evolution-a2db8a30c8e384371c37c7396246505aa54fb58e.zip |
Dont get the filter driver inside the change_lock. Its not necessary, and
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.
svn path=/trunk/; revision=18321
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-folder.c | 14 |
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; |