From 9801f37793cd5ef06da86ce96d52bc66e77083d5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 17 Mar 2004 10:03:58 +0000 Subject: split this, only call add_store/note_store once we've actually set the 2004-03-17 Not Zed * mail-offline-handler.c (store_go_online): split this, only call add_store/note_store once we've actually set the store online. (store_went_online): set the store up once we're fully online. Works around a deadlock in #55618. svn path=/trunk/; revision=25097 --- mail/mail-offline-handler.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mail/mail-offline-handler.c b/mail/mail-offline-handler.c index 28cecf2e43..d2b2cdbce0 100644 --- a/mail/mail-offline-handler.c +++ b/mail/mail-offline-handler.c @@ -172,6 +172,16 @@ impl_goOffline (PortableServer_Servant servant, mail_component_stores_foreach (mail_component_peek (), store_go_offline, progress_listener); } +static void +store_went_online(CamelStore *store, void *data) +{ + char *name = data; + + em_folder_tree_model_add_store(mail_component_peek_tree_model(mail_component_peek()), store, name); + mail_note_store (store, NULL, NULL, NULL); + g_free(name); +} + static void store_go_online (gpointer key, gpointer value, gpointer data) { @@ -179,9 +189,7 @@ store_go_online (gpointer key, gpointer value, gpointer data) char *name = value; if (service_is_relevant (CAMEL_SERVICE (store), FALSE)) { - mail_store_set_offline (store, FALSE, NULL, NULL); - em_folder_tree_model_add_store(mail_component_peek_tree_model(mail_component_peek()), store, name); - mail_note_store (store, NULL, NULL, NULL); + mail_store_set_offline (store, FALSE, store_went_online, g_strdup(name)); } } -- cgit v1.2.3