From 86d2d39580ff3aa27f17766dd117765f4786b924 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Wed, 24 Jul 2002 19:37:57 +0000 Subject: Call camel_session_get_service instead of camel_session_get_store, as 2002-07-23 Peter Williams * mail-ops.c (get_store_get): Call camel_session_get_service instead of camel_session_get_store, as _get_store calls _get_service_connected which is not what we want to do on startup. (set_offline_do): Rework the logic here. It was failing when trying to go online with a disco store that couldn't work offline. * mail-folder-cache.c (mail_note_store): If we're using an offline (well, non-online) disco store that cannot work offline, don't get the folderinfo as that will fail. svn path=/trunk/; revision=17576 --- mail/mail-folder-cache.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 0e352bd634..5d7f1c879e 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "mail-mt.h" @@ -761,12 +762,17 @@ mail_note_store(CamelStore *store, EvolutionStorage *storage, GNOME_Evolution_St camel_object_hook_event((CamelObject *)store, "folder_unsubscribed", store_folder_unsubscribed, NULL); } - ud = g_malloc(sizeof(*ud)); - ud->done = done; - ud->data = data; - ud->id = mail_get_folderinfo(store, update_folders, ud); - e_dlist_addtail(&si->folderinfo_updates, (EDListNode *)ud); + if (!CAMEL_IS_DISCO_STORE (store) || + camel_disco_store_status (CAMEL_DISCO_STORE (store)) == CAMEL_DISCO_STORE_ONLINE || + camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (store))) { + ud = g_malloc(sizeof(*ud)); + ud->done = done; + ud->data = data; + ud->id = mail_get_folderinfo(store, update_folders, ud); + + e_dlist_addtail(&si->folderinfo_updates, (EDListNode *)ud); + } UNLOCK(info_lock); } -- cgit v1.2.3