aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-07-24 10:33:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-07-24 10:33:26 +0800
commit816d869e701164cbb1cee524b1ed39b4f61f05ca (patch)
tree2ad834d700a6aa432c66067e579c9a764c24267d /camel
parent1bddc83831d27affaeb2d53d6808c696cecb5021 (diff)
downloadgsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.tar
gsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.tar.gz
gsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.tar.bz2
gsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.tar.lz
gsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.tar.xz
gsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.tar.zst
gsoc2013-evolution-816d869e701164cbb1cee524b1ed39b4f61f05ca.zip
Duplicated the very much hack in imap_store_refresh_folders() to avoid a
2002-07-24 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Duplicated the very much hack in imap_store_refresh_folders() to avoid a deadlock in #27959. A decent fix has to wait for a rewrite. svn path=/trunk/; revision=17560
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/providers/imap/camel-imap-store.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 985dda6efe..0f7299b4a2 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2002-07-24 Not Zed <NotZed@Ximian.com>
+
+ * providers/imap/camel-imap-store.c (get_folder_info_online):
+ Duplicated the very much hack in imap_store_refresh_folders() to
+ avoid a deadlock in #27959. A decent fix has to wait for a
+ rewrite.
+
2002-07-23 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream.c: #include <string.h> for memcpy.
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index fbc6c39b31..2065b53007 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -767,6 +767,7 @@ copy_folder(char *key, CamelFolder *folder, GPtrArray *out)
/* the alternative is to:
make the camel folder->lock recursive (which should probably be done)
or remove it from camel_folder_refresh_info, and use another locking mechanism */
+/* also see get_folder_info_online() for the same hack repeated */
static void
imap_store_refresh_folders (CamelImapStore *store, CamelException *ex)
{
@@ -2013,7 +2014,9 @@ get_folder_info_online (CamelStore *store, const char *top,
*/
if (imap_store->current_folder &&
!strcmp (imap_store->current_folder->full_name, fi->full_name)) {
- camel_folder_refresh_info (imap_store->current_folder, NULL);
+ /* we bypass the folder locking otherwise we can deadlock. we use the command lock for
+ any operations anyway so this is 'safe'. See comment above imap_store_refresh_folders() for info */
+ CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(imap_store->current_folder))->refresh_info(imap_store->current_folder, ex);
fi->unread_message_count = camel_folder_get_unread_message_count (imap_store->current_folder);
} else
fi->unread_message_count = get_folder_status (imap_store, fi->full_name, "UNSEEN");