[evolution-data-server] E_CLIENT_ERROR_BUSY is no longer used.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] E_CLIENT_ERROR_BUSY is no longer used.
- Date: Thu, 24 Jan 2013 17:15:48 +0000 (UTC)
commit ea54435f2a9dc191d585b36fddd3f51d80c54036
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Jan 24 11:49:31 2013 -0500
E_CLIENT_ERROR_BUSY is no longer used.
.../backends/contacts/e-cal-backend-contacts.c | 6 +--
calendar/libecal/e-cal-client.c | 52 --------------------
2 files changed, 1 insertions(+), 57 deletions(-)
---
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index 07e87e1..bcef26e 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -252,11 +252,7 @@ cbc_reopen_book_client_thread (gpointer user_data)
GError *error = NULL;
if (!e_client_open_sync (E_CLIENT (book_client), TRUE, NULL, &error) || error) {
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) {
- done = FALSE;
- g_usleep (500000);
- } else
- g_warning ("%s: Failed to open book: %s", G_STRFUNC, error ? error->message : "Unknown error");
+ g_warning ("%s: Failed to open book: %s", G_STRFUNC, error ? error->message : "Unknown error");
}
g_clear_error (&error);
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index 906426c..421a63d 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -1937,18 +1937,8 @@ get_objects_sync (ECalClient *client,
/* Generate objects */
if (uid && *uid) {
GError *error = NULL;
- gint tries = 0;
- try_again:
if (!e_cal_client_get_objects_for_uid_sync (client, uid, &objects, NULL, &error)) {
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY) && tries <= 10) {
- tries++;
- g_usleep (500);
- g_clear_error (&error);
-
- goto try_again;
- }
-
unwrap_dbus_error (error, &error);
g_message ("Failed to get recurrence objects for uid %s \n", error ? error->message : "Unknown error");
g_clear_error (&error);
@@ -2020,8 +2010,6 @@ free_get_objects_async_data (struct get_objects_async_data *goad)
g_free (goad);
}
-static gboolean repeat_get_objects_for_uid_timeout_cb (gpointer user_data);
-
static void
got_objects_for_uid_cb (GObject *source_object,
GAsyncResult *result,
@@ -2044,13 +2032,6 @@ got_objects_for_uid_cb (GObject *source_object,
return;
}
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY) && goad->tries < 10) {
- goad->tries++;
- g_timeout_add (250, repeat_get_objects_for_uid_timeout_cb, goad);
- g_clear_error (&error);
- return;
- }
-
g_clear_error (&error);
objects = NULL;
}
@@ -2061,20 +2042,6 @@ got_objects_for_uid_cb (GObject *source_object,
goad->ready_cb (goad, objects);
}
-static gboolean
-repeat_get_objects_for_uid_timeout_cb (gpointer user_data)
-{
- struct get_objects_async_data *goad = user_data;
-
- g_return_val_if_fail (goad != NULL, FALSE);
-
- e_cal_client_get_objects_for_uid (goad->client, goad->uid, goad->cancellable, got_objects_for_uid_cb, goad);
-
- return FALSE;
-}
-
-static gboolean repeat_get_object_list_as_comps_timeout_cb (gpointer user_data);
-
static void
got_object_list_as_comps_cb (GObject *source_object,
GAsyncResult *result,
@@ -2097,13 +2064,6 @@ got_object_list_as_comps_cb (GObject *source_object,
return;
}
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY) && goad->tries < 10) {
- goad->tries++;
- g_timeout_add (250, repeat_get_object_list_as_comps_timeout_cb, goad);
- g_clear_error (&error);
- return;
- }
-
g_clear_error (&error);
objects = NULL;
}
@@ -2114,18 +2074,6 @@ got_object_list_as_comps_cb (GObject *source_object,
goad->ready_cb (goad, objects);
}
-static gboolean
-repeat_get_object_list_as_comps_timeout_cb (gpointer user_data)
-{
- struct get_objects_async_data *goad = user_data;
-
- g_return_val_if_fail (goad != NULL, FALSE);
-
- e_cal_client_get_object_list_as_comps (goad->client, goad->query, goad->cancellable, got_object_list_as_comps_cb, goad);
-
- return FALSE;
-}
-
/* ready_cb may take care of both arguments, goad and objects; objects can be also NULL */
static void
get_objects_async (void (*ready_cb) (struct get_objects_async_data *goad,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]