[evolution-ews/gnome-2-28] Bug #668555 Crash in ews_cal_sync_items_ready_cb
- From: Punit Jain <jpunit src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-2-28] Bug #668555 Crash in ews_cal_sync_items_ready_cb
- Date: Tue, 27 Mar 2012 07:00:20 +0000 (UTC)
commit 5e47fc16b7c360f2b152a4aefb089fa514ce76f8
Author: Punit Jain <jpunit novell com>
Date: Tue Mar 27 12:39:05 2012 +0530
Bug #668555 Crash in ews_cal_sync_items_ready_cb
src/calendar/e-cal-backend-ews.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index d167569..34dc0e4 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3255,7 +3255,7 @@ ews_cal_get_items_ready_cb (GObject *obj, GAsyncResult *res, gpointer user_data)
const EwsId *item_id = e_ews_item_get_id (l->data);
sub_sync_data = g_new0 (struct _ews_sync_data, 1);
- sub_sync_data->cbews = sync_data->cbews;
+ sub_sync_data->cbews = g_object_ref (sync_data->cbews);
sub_sync_data->master_uid = g_strdup (item_id->id);
e_ews_connection_get_items_start(g_object_ref(cnc), EWS_PRIORITY_MEDIUM,
@@ -3290,9 +3290,10 @@ ews_cal_get_items_ready_cb (GObject *obj, GAsyncResult *res, gpointer user_data)
"IdOnly", NULL,
EWS_MAX_FETCH_COUNT,
ews_cal_sync_items_ready_cb,
- NULL, cbews);
+ NULL, g_object_ref (cbews));
exit:
+ g_object_unref (sync_data->cbews);
g_free (sync_data->master_uid);
g_free (sync_data->sync_state);
g_free (sync_data);
@@ -3348,6 +3349,7 @@ ews_cal_sync_items_ready_cb (GObject *obj, GAsyncResult *res, gpointer user_data
PRIV_LOCK (priv);
priv->refreshing = FALSE;
PRIV_UNLOCK (priv);
+ g_object_unref (cbews);
return;
}
@@ -3393,14 +3395,14 @@ ews_cal_sync_items_ready_cb (GObject *obj, GAsyncResult *res, gpointer user_data
"IdOnly", NULL,
EWS_MAX_FETCH_COUNT,
ews_cal_sync_items_ready_cb,
- NULL, cbews);
+ NULL, g_object_ref (cbews));
g_free (sync_state);
goto exit;
}
if (cal_item_ids || task_item_ids) {
sync_data = g_new0 (struct _ews_sync_data, 1);
- sync_data->cbews = cbews;
+ sync_data->cbews = g_object_ref (cbews);
sync_data->sync_state = sync_state;
sync_data->sync_pending = !includes_last_item;
}
@@ -3444,6 +3446,8 @@ exit:
g_slist_free (items_updated);
if (items_deleted)
g_slist_free (items_deleted);
+
+ g_object_unref (cbews);
}
static gboolean
@@ -3467,7 +3471,7 @@ ews_start_sync (gpointer data)
"IdOnly", NULL,
EWS_MAX_FETCH_COUNT,
ews_cal_sync_items_ready_cb,
- NULL, cbews);
+ NULL, g_object_ref (cbews));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]