From 5c501444a0178a37a69bccbad0d5628f93fd9fa0 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Tue, 16 Jul 2002 15:14:27 +0000 Subject: If we're not online and the message isn't in our cache, give up. 2002-07-15 Peter Williams * providers/imap/camel-imap-folder.c (imap_get_message): If we're not online and the message isn't in our cache, give up. svn path=/trunk/; revision=17475 --- camel/providers/imap/camel-imap-folder.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'camel/providers') diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index ee8a7b1f4a..8688adb8a0 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1821,7 +1821,13 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex) if (store->server_level < IMAP_LEVEL_IMAP4REV1 || (stream = camel_imap_folder_fetch_data (imap_folder, uid, "", TRUE, NULL))) return get_message_simple (imap_folder, uid, stream, ex); - + + /* If we're not actually connected and it's not in the cache, + * that's as far as we can go. + */ + if (camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex) == FALSE) + return NULL; + mi = camel_folder_summary_uid (folder->summary, uid); g_return_val_if_fail (mi != NULL, NULL); -- cgit v1.2.3