aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-02-22 18:49:55 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-02-22 18:49:55 +0800
commitefb45db411d5f64e95cc2eba2501ff3f73239cb3 (patch)
tree1b296f58812fe164aa0a9bd600dbe46a3fe30121 /mail/mail-folder-cache.c
parentbdb224def86d58bde4218fa8ed21d689242923f9 (diff)
downloadgsoc2013-evolution-efb45db411d5f64e95cc2eba2501ff3f73239cb3.tar.gz
gsoc2013-evolution-efb45db411d5f64e95cc2eba2501ff3f73239cb3.tar.zst
gsoc2013-evolution-efb45db411d5f64e95cc2eba2501ff3f73239cb3.zip
** Fix for bug #512776
2008-02-22 Milan Crha <mcrha@redhat.com> ** Fix for bug #512776 * Changes below prevents deadlock on start or send/receive. * mail-send-recv.c: (struct _refresh_folders_msg), (refresh_folders_exec), (refresh_folders_free), (receive_update_got_folderinfo): Do not look for active folders in main thread, rather do it in other thread and free folder info later. * mail-ops.h: (mail_get_folderinfo): * mail-ops.c: (struct _get_folderinfo_msg), (get_folderinfo_done), (get_folderinfo_free), (mail_get_folderinfo): * mail-folder-cache.h: (mail_note_store): * mail-folder-cache.c: (struct _update_data), (update_folders), (mail_note_store): * mail-component.c: (mc_add_store_done): The 'done' function returns if we can free folder info or not. svn path=/trunk/; revision=35071
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index b88d8f79ac..417f115999 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -723,7 +723,7 @@ struct _update_data {
int id; /* id for cancellation */
guint cancel:1; /* also tells us we're cancelled */
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
void *data;
};
@@ -782,11 +782,12 @@ mail_note_store_remove(CamelStore *store)
UNLOCK(info_lock);
}
-static void
+static gboolean
update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
{
struct _update_data *ud = data;
struct _store_info *si;
+ gboolean res = TRUE;
d(printf("Got folderinfo for store %s\n", store->parent_object.provider->protocol));
@@ -803,8 +804,10 @@ update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
UNLOCK(info_lock);
if (ud->done)
- ud->done(store, fi, ud->data);
+ res = ud->done (store, fi, ud->data);
g_free(ud);
+
+ return res;
}
@@ -906,7 +909,7 @@ store_online_cb (CamelStore *store, void *data)
void
mail_note_store(CamelStore *store, CamelOperation *op,
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
{
struct _store_info *si;
struct _update_data *ud;