[evolution-ews] Bug #705617 - Failed connection hides offline data in online mode
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #705617 - Failed connection hides offline data in online mode
- Date: Thu, 8 Aug 2013 11:55:29 +0000 (UTC)
commit d70245fe7e80b6123934fcf0af2860b5cea81059
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 8 13:55:07 2013 +0200
Bug #705617 - Failed connection hides offline data in online mode
src/camel/camel-ews-store.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index e3cc75c..6a7d5be 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -656,7 +656,7 @@ ews_connect_sync (CamelService *service,
auth_mech = camel_network_settings_dup_auth_mechanism (
CAMEL_NETWORK_SETTINGS (settings));
success = camel_session_authenticate_sync (session, service,
- auth_mech ? auth_mech :"NTLM", cancellable, error);
+ auth_mech ? auth_mech : "NTLM", cancellable, error);
g_free (auth_mech);
g_object_unref (settings);
@@ -1727,13 +1727,19 @@ ews_get_folder_info_sync (CamelStore *store,
}
g_mutex_lock (&priv->get_finfo_lock);
- if (!(camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))
- && camel_service_connect_sync ((CamelService *) store, cancellable, error))) {
+ if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))) {
camel_ews_store_ensure_virtual_folders (ews_store);
g_mutex_unlock (&priv->get_finfo_lock);
goto offline;
}
+ if (!camel_service_connect_sync ((CamelService *) store, cancellable, error)) {
+ camel_offline_store_set_online_sync (CAMEL_OFFLINE_STORE (store), FALSE, NULL, NULL);
+ camel_ews_store_ensure_virtual_folders (ews_store);
+ g_mutex_unlock (&priv->get_finfo_lock);
+ return NULL;
+ }
+
old_sync_state = camel_ews_store_summary_get_string_val (ews_store->summary, "sync_state", NULL);
if (!old_sync_state)
initial_setup = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]