split this, only call add_store/note_store once we've actually set the

2004-03-17  Not Zed  <NotZed@Ximian.com>

        * 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
This commit is contained in:
Not Zed
2004-03-17 10:03:58 +00:00
committed by Michael Zucci
parent bc5fc28e5b
commit 9801f37793

View File

@ -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));
}
}