aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-25 01:02:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-25 01:10:31 +0800
commit60c5c7170f5642a78a4fd2092e4e78caae8475d6 (patch)
tree70620e5c6207172473e96d405cfeb90f3eb6a205 /calendar
parentf3dfdae8458d08331551ce441be045f4dfaa8b77 (diff)
downloadgsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar
gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.gz
gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.bz2
gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.lz
gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.xz
gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.tar.zst
gsoc2013-evolution-60c5c7170f5642a78a4fd2092e4e78caae8475d6.zip
E_CLIENT_ERROR_BUSY is no longer used.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-cal-model.c57
-rw-r--r--calendar/gui/gnome-cal.c12
2 files changed, 0 insertions, 69 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index b7c7145c05..617399b0a5 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -3005,28 +3005,6 @@ cal_model_retrieve_capabilies_cb (GObject *source_object,
update_e_cal_view_for_client (model, client_data);
}
-struct RetryOpenData
-{
- EClient *client;
- ECalModel *model;
- GCancellable *cancellable;
-};
-
-static void
-free_retry_open_data (gpointer data)
-{
- struct RetryOpenData *rod = data;
-
- if (!rod)
- return;
-
- g_object_unref (rod->client);
- g_object_unref (rod->cancellable);
- g_free (rod);
-}
-
-static gboolean cal_model_retry_open_timeout_cb (gpointer user_data);
-
static void
client_opened_cb (GObject *source_object,
GAsyncResult *result,
@@ -3044,25 +3022,6 @@ client_opened_cb (GObject *source_object,
return;
}
- if (error && g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) {
- struct RetryOpenData *rod;
-
- rod = g_new0 (struct RetryOpenData, 1);
- rod->client = g_object_ref (client);
- rod->model = model;
- rod->cancellable = g_object_ref (model->priv->loading_clients);
-
- /* postpone for 1/2 of a second, backend is busy now */
- g_timeout_add_full (
- G_PRIORITY_DEFAULT, 500,
- cal_model_retry_open_timeout_cb,
- rod, free_retry_open_data);
-
- g_error_free (error);
-
- return;
- }
-
if (error != NULL) {
ESource *source;
@@ -3084,22 +3043,6 @@ client_opened_cb (GObject *source_object,
cal_model_retrieve_capabilies_cb, model);
}
-static gboolean
-cal_model_retry_open_timeout_cb (gpointer user_data)
-{
- struct RetryOpenData *rod = user_data;
-
- g_return_val_if_fail (rod != NULL, FALSE);
- g_return_val_if_fail (rod->client != NULL, FALSE);
- g_return_val_if_fail (rod->model != NULL, FALSE);
-
- e_client_open (
- rod->client, TRUE, rod->cancellable,
- client_opened_cb, rod->model);
-
- return FALSE;
-}
-
static ECalModelClient *
add_new_client (ECalModel *model,
ECalClient *client,
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 8b9b2b3c17..66bb52a0a1 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1176,25 +1176,13 @@ update_query_async (struct _date_query_msg *msg)
for (iter = list; iter != NULL; iter = iter->next) {
ECalClient *client = E_CAL_CLIENT (iter->data);
GError *error = NULL;
- gint tries = 0;
/* don't create queries for clients not loaded yet */
if (!e_client_is_opened (E_CLIENT (client)))
continue;
- try_again:
new_view = NULL;
if (!e_cal_client_get_view_sync (client, real_sexp, &new_view, NULL, &error)) {
- /* If calendar is busy try again for 3 times. */
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY) && tries != 10) {
- tries++;
- /*TODO chose an optimal value */
- g_usleep (500);
-
- g_clear_error (&error);
- goto try_again;
- }
-
g_warning (G_STRLOC ": Could not create the view: %s ", error->message);
g_clear_error (&error);