diff options
author | Peter Williams <peterw@ximian.com> | 2002-07-25 03:37:57 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-07-25 03:37:57 +0800 |
commit | 86d2d39580ff3aa27f17766dd117765f4786b924 (patch) | |
tree | 07144b11fc3dcf90804e51779fc3328000a6640e /mail/mail-folder-cache.c | |
parent | a401de9c229ea548029863b34672c34137a2ca94 (diff) | |
download | gsoc2013-evolution-86d2d39580ff3aa27f17766dd117765f4786b924.tar.gz gsoc2013-evolution-86d2d39580ff3aa27f17766dd117765f4786b924.tar.zst gsoc2013-evolution-86d2d39580ff3aa27f17766dd117765f4786b924.zip |
Call camel_session_get_service instead of camel_session_get_store, as
2002-07-23 Peter Williams <peterw@ximian.com>
* 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
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 16 |
1 files changed, 11 insertions, 5 deletions
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 <camel/camel-folder.h> #include <camel/camel-vtrash-folder.h> #include <camel/camel-vee-store.h> +#include <camel/camel-disco-store.h> #include <gal/util/e-unicode-i18n.h> #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); } |