[gnome-calendar] manager: don't query disconnected clients
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: don't query disconnected clients
- Date: Wed, 24 Dec 2014 16:13:25 +0000 (UTC)
commit 358b3766a0f091a05cfa24d7eb5056beab0cdc3d
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Wed Dec 24 11:08:30 2014 -0500
manager: don't query disconnected clients
src/gcal-manager.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index cc07e79..3074b6c 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -900,11 +900,9 @@ gcal_manager_refresh (GcalManager *manager)
/* refresh clients */
for (l = clients; l != NULL; l = l->next)
{
- GcalManagerUnit *unit;
+ GcalManagerUnit *unit = l->data;
- unit = (GcalManagerUnit*) l->data;
-
- if (! e_client_check_refresh_supported (E_CLIENT (unit->client)))
+ if (!unit->connected && ! e_client_check_refresh_supported (E_CLIENT (unit->client)))
continue;
e_client_refresh (E_CLIENT (unit->client),
@@ -924,9 +922,9 @@ gcal_manager_is_client_writable (GcalManager *manager,
GcalManagerUnit *unit;
priv = gcal_manager_get_instance_private (manager);
-
unit = g_hash_table_lookup (priv->clients, source);
- return e_client_is_readonly (E_CLIENT (unit->client));
+
+ return unit->connected && e_client_is_readonly (E_CLIENT (unit->client));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]