summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2019-06-11 22:47:33 +0200
committerMilan Crha <mcrha@redhat.com>2019-06-11 23:12:40 +0200
commitc59660e75e9f7bb60321d01e1e62b0442ad8e7d5 (patch)
tree8ee29f64b44968217e6bb85c987423863867e479
parent73680739d01f4a088a8cbc6b9f3cf5dbdfbf2c02 (diff)
downloadevolution-data-server-c59660e75e9f7bb60321d01e1e62b0442ad8e7d5.tar.gz
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.
-rw-r--r--src/camel/camel-offline-store.c9
1 files 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;
}