[evolution-ews/gnome-3-8] 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/gnome-3-8] Bug #705617 - Failed connection hides offline data in online mode
- Date: Thu, 8 Aug 2013 11:56:05 +0000 (UTC)
commit 2beeb92e1809b36a07b7b13b62ad01e508c89005
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 8 13:55:46 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 62d53c1..3732d7d 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -519,7 +519,7 @@ ews_connect_sync (CamelService *service,
auth_mech = camel_network_settings_dup_auth_mechanism (
CAMEL_NETWORK_SETTINGS (settings));
if (!auth_mech)
- auth_mech = g_strdup("NTLM");
+ auth_mech = g_strdup ("NTLM");
retry:
success = camel_session_authenticate_sync (session, service,
auth_mech, cancellable, error);
@@ -1611,13 +1611,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]