[evolution-mapi] Properly adapt to changes in CamelService status tracking from eds
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Properly adapt to changes in CamelService status tracking from eds
- Date: Fri, 29 Apr 2011 15:12:28 +0000 (UTC)
commit 8179dc8717ae083dda8550ef0182e0f350c663c7
Author: Milan Crha <mcrha redhat com>
Date: Fri Apr 29 17:10:05 2011 +0200
Properly adapt to changes in CamelService status tracking from eds
This involves revert of commit e61eaeb5 and connecting to the store
through camel_service_connect_sync(), instead of mapi_connect_sync(),
because the later cannot change service's status directly.
src/camel/camel-mapi-store.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index 18e6959..7ed9c8e 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -1010,9 +1010,8 @@ mapi_store_get_folder_info_sync (CamelStore *store,
camel_service_lock (service, CAMEL_SERVICE_REC_CONNECT_LOCK);
if (camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))) {
- if (status == CAMEL_SERVICE_DISCONNECTED) {
- mapi_connect_sync (service, cancellable, NULL);
- }
+ if (status == CAMEL_SERVICE_DISCONNECTED)
+ camel_service_connect_sync (service, NULL);
/* update folders from the server only when asking for the top most or the 'top' is not known;
otherwise believe the local cache, because folders sync is pretty slow operation to be done
@@ -1751,6 +1750,7 @@ mapi_connect_sync (CamelService *service,
GError **error)
{
CamelMapiStore *store = CAMEL_MAPI_STORE (service);
+ CamelServiceConnectionStatus status;
CamelProvider *provider;
CamelSession *session;
CamelURL *url;
@@ -1759,8 +1759,9 @@ mapi_connect_sync (CamelService *service,
url = camel_service_get_camel_url (service);
session = camel_service_get_session (service);
provider = camel_service_get_provider (service);
+ status = camel_service_get_connection_status (service);
- if (!camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store))) {
+ if (status == CAMEL_SERVICE_DISCONNECTED) {
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]