[evolution-data-server] [IMAPX] Server connection is not mandatory when searching folder content



commit 3ce1c9bac3d3bd3f7d1ee084cf8fc807ad255fd6
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jul 4 12:35:34 2013 +0200

    [IMAPX] Server connection is not mandatory when searching folder content
    
    In case the store is kept online, but the server cannot be reached,
    like when it's hidden behind the VPN, the IMAPX folder should show
    offline content, rather than nothing at all. After all, live server
    connection is needed for body-contains only, and only that to not
    download all messages in the folder.

 camel/camel-imapx-folder.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/camel/camel-imapx-folder.c b/camel/camel-imapx-folder.c
index a00caa0..132d0dc 100644
--- a/camel/camel-imapx-folder.c
+++ b/camel/camel-imapx-folder.c
@@ -320,11 +320,11 @@ imapx_search_by_uids (CamelFolder *folder,
                CAMEL_OFFLINE_STORE (parent_store));
 
        if (online) {
+               /* do not panic when the server cannot be reached for whatever reason,
+                  show offline data at least */
                server = camel_imapx_store_get_server (
                        CAMEL_IMAPX_STORE (parent_store),
-                       folder_name, cancellable, error);
-               if (server == NULL)
-                       return NULL;
+                       folder_name, cancellable, NULL);
        }
 
        g_mutex_lock (&ifolder->search_lock);
@@ -369,11 +369,11 @@ imapx_count_by_expression (CamelFolder *folder,
                CAMEL_OFFLINE_STORE (parent_store));
 
        if (online) {
+               /* do not panic when the server cannot be reached for whatever reason,
+                  show offline data at least */
                server = camel_imapx_store_get_server (
                        CAMEL_IMAPX_STORE (parent_store),
-                       folder_name, cancellable, error);
-               if (server == NULL)
-                       return 0;
+                       folder_name, cancellable, NULL);
        }
 
        g_mutex_lock (&ifolder->search_lock);
@@ -418,11 +418,11 @@ imapx_search_by_expression (CamelFolder *folder,
                CAMEL_OFFLINE_STORE (parent_store));
 
        if (online) {
+               /* do not panic when the server cannot be reached for whatever reason,
+                  show offline data at least */
                server = camel_imapx_store_get_server (
                        CAMEL_IMAPX_STORE (parent_store),
-                       folder_name, cancellable, error);
-               if (server == NULL)
-                       return NULL;
+                       folder_name, cancellable, NULL);
        }
 
        g_mutex_lock (&ifolder->search_lock);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]