[evolution-exchange] Bug 603567 - e-calendar-factory crashes if i try to create any appointment



commit 0be5af4bddd93754b2e82b2278d4fa9fc0990843
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Wed Dec 2 15:06:16 2009 +0530

    Bug 603567 -  e-calendar-factory crashes if i try to create any appointment

 calendar/e-cal-backend-exchange-calendar.c |   14 ++++++--------
 calendar/e-cal-backend-exchange.h          |    2 --
 2 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/calendar/e-cal-backend-exchange-calendar.c b/calendar/e-cal-backend-exchange-calendar.c
index 6efb6a0..e17f495 100644
--- a/calendar/e-cal-backend-exchange-calendar.c
+++ b/calendar/e-cal-backend-exchange-calendar.c
@@ -614,7 +614,7 @@ add_timezone_cb (icalparameter *param, gpointer data)
 	struct _cb_data *cbdata = (struct _cb_data *) data;
 	icalcomponent *vtzcomp;
 	const gchar *tzid;
-	gchar *izone = NULL;
+	icaltimezone *zone = NULL;
 
 	g_return_if_fail (cbdata != NULL);
 
@@ -624,11 +624,11 @@ add_timezone_cb (icalparameter *param, gpointer data)
 	if (icalcomponent_get_timezone (cbdata->vcal_comp, tzid))
 		return;
 
-	get_timezone (cbdata->be, cbdata->cal, tzid, &izone);
-	if (izone == NULL)
+	zone = e_cal_backend_internal_get_timezone ((ECalBackend *) cbdata->be, tzid);
+	if (zone == NULL)
 		return;
 
-	vtzcomp = icalcomponent_new_from_string (izone);
+	vtzcomp = icalcomponent_new_clone (icaltimezone_get_component (zone));
 	if (vtzcomp)
 		icalcomponent_add_component (cbdata->vcal_comp, vtzcomp);
 }
@@ -1292,11 +1292,9 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
 			if (dt.tzid == NULL)
 				from_zone = icaltimezone_get_utc_timezone ();
 			else {
-				gchar *izone = NULL;
-				get_timezone (backend, cal, dt.tzid, &izone);
-				from_zone = icalcomponent_get_timezone (icalcomponent_new_from_string (izone),
-											dt.tzid);
+				from_zone = e_cal_backend_internal_get_timezone ((ECalBackend *) backend, dt.tzid);
 			}
+
 			to_zone = icaltimezone_get_utc_timezone ();
 
 			r->until.hour = dt.value->hour;
diff --git a/calendar/e-cal-backend-exchange.h b/calendar/e-cal-backend-exchange.h
index 03f8450..970e995 100644
--- a/calendar/e-cal-backend-exchange.h
+++ b/calendar/e-cal-backend-exchange.h
@@ -78,8 +78,6 @@ icaltimezone * e_cal_backend_exchange_get_default_time_zone (ECalBackendSync *ba
 
 gchar *	  e_cal_backend_exchange_lf_to_crlf	(const gchar *in);
 gchar *	  e_cal_backend_exchange_make_timestamp_rfc822	(time_t when);
-ECalBackendSyncStatus	get_timezone	(ECalBackendSync *backend,
-							EDataCal *cal, const gchar *tzid, gchar **object);
 
 /** lookup function for e_cal_check_timezones() */
 icaltimezone *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]