aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-29 12:52:04 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-29 12:52:04 +0800
commitc2e50c15bb32ecfee61040609745aff4415bbc1e (patch)
tree87d6a93c430f8ac70a243707bb2dadd33f64eea2 /camel/providers
parent9fab86cb59bf7ca18e5f00c0b6c31a4b24ba390d (diff)
downloadgsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.tar
gsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.tar.gz
gsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.tar.bz2
gsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.tar.lz
gsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.tar.xz
gsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.tar.zst
gsoc2013-evolution-c2e50c15bb32ecfee61040609745aff4415bbc1e.zip
remove locking here, we're locked whne we enter. (fill_fi): call
2004-03-29 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_counts): remove locking here, we're locked whne we enter. (fill_fi): call refresh_info unlocked. More for #56045. svn path=/trunk/; revision=25217
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-store.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 2d8206b79d..bf8a3152c5 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -2361,7 +2361,8 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
folder = camel_object_bag_get(store->folders, fi->full_name);
if (folder) {
if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
- camel_folder_refresh_info(folder, NULL);
+ /* we use connect lock for everything, so this should be safe */
+ CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(folder))->refresh_info(folder, NULL);
fi->unread = camel_folder_get_unread_message_count(folder);
fi->total = camel_folder_get_message_count(folder);
camel_object_unref(folder);
@@ -2388,6 +2389,7 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
}
}
+/* NB: We should have connect_lock at this point */
static void
get_folder_counts(CamelImapStore *imap_store, CamelFolderInfo *fi, CamelException *ex)
{
@@ -2420,7 +2422,6 @@ get_folder_counts(CamelImapStore *imap_store, CamelFolderInfo *fi, CamelExceptio
&& ( (imap_store->parameters & IMAP_PARAM_CHECK_ALL)
|| g_ascii_strcasecmp(fi->full_name, "inbox") == 0) ) {
- CAMEL_SERVICE_LOCK (imap_store, connect_lock);
/* For the current folder, poke it to check for new
* messages and then report that number, rather than
* doing a STATUS command.
@@ -2443,8 +2444,6 @@ get_folder_counts(CamelImapStore *imap_store, CamelFolderInfo *fi, CamelExceptio
fi->total = camel_folder_get_message_count(folder);
}
}
-
- CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
} else {
/* since its cheap, get it if they're open/consult summary file */
fill_fi((CamelStore *)imap_store, fi, 0);