[evolution-data-server/gnome-3-32] Change how CamelOfflineStore goes online
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-32] Change how CamelOfflineStore goes online
- Date: Tue, 11 Jun 2019 21:12:17 +0000 (UTC)
commit 87f0ef4fd51ebca67078af3000646a1eef21c4ab
Author: Milan Crha <mcrha redhat com>
Date: Tue Jun 11 22:47:33 2019 +0200
Change how CamelOfflineStore goes online
As it was, when the store went online, it just connected, even the code
tried to do some things when going online, like synchronizing messages
for offline use. The change allows to do what was meant to be done.
src/camel/camel-offline-store.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/camel-offline-store.c b/src/camel/camel-offline-store.c
index 148c6e5b0..73793493d 100644
--- a/src/camel/camel-offline-store.c
+++ b/src/camel/camel-offline-store.c
@@ -275,7 +275,8 @@ camel_offline_store_set_online_sync (CamelOfflineStore *store,
if (camel_service_get_connection_status (service) == CAMEL_SERVICE_CONNECTING)
return TRUE;
- return camel_service_connect_sync (service, cancellable, error);
+ if (!camel_service_connect_sync (service, cancellable, error))
+ return FALSE;
}
if (host_reachable) {
@@ -339,9 +340,11 @@ camel_offline_store_set_online_sync (CamelOfflineStore *store,
service, host_reachable, cancellable, error);
}
- store->priv->online = online;
+ if (store->priv->online != online) {
+ store->priv->online = online;
- g_object_notify (G_OBJECT (store), "online");
+ g_object_notify (G_OBJECT (store), "online");
+ }
return success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]