[evolution-data-server] [IMAPx] Handle gracefully when service is unavailable for get_folder_info()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [IMAPx] Handle gracefully when service is unavailable for get_folder_info()
- Date: Fri, 1 Sep 2017 10:54:49 +0000 (UTC)
commit 6c9848316ba7867ae195779ef5035e9bee661715
Author: Milan Crha <mcrha redhat com>
Date: Fri Sep 1 12:52:57 2017 +0200
[IMAPx] Handle gracefully when service is unavailable for get_folder_info()
Return TRUE, as 'success', in case the namespace response is not available,
which can be for cases like server being reachable, but the service unavailable,
which allows to return at least the last known folders for the account, like
in the offline mode.
src/camel/providers/imapx/camel-imapx-store.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-store.c b/src/camel/providers/imapx/camel-imapx-store.c
index 82f0e05..acf6685 100644
--- a/src/camel/providers/imapx/camel-imapx-store.c
+++ b/src/camel/providers/imapx/camel-imapx-store.c
@@ -1398,7 +1398,8 @@ fetch_folder_info_for_namespace_category (CamelIMAPXStore *imapx_store,
gboolean success = TRUE;
namespace_response = camel_imapx_store_ref_namespaces (imapx_store);
- g_return_val_if_fail (namespace_response != NULL, FALSE);
+ if (!namespace_response)
+ return TRUE;
list = camel_imapx_namespace_response_list (namespace_response);
@@ -1452,7 +1453,8 @@ fetch_folder_info_from_folder_path (CamelIMAPXStore *imapx_store,
gboolean success = FALSE;
namespace_response = camel_imapx_store_ref_namespaces (imapx_store);
- g_return_val_if_fail (namespace_response != NULL, FALSE);
+ if (!namespace_response)
+ return TRUE;
/* Find a suitable IMAP namespace for the folder path. */
namespace = camel_imapx_namespace_response_lookup_for_path (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]