Index: mail/mail-utils.c
===================================================================
--- mail/mail-utils.c	(revision 1845)
+++ mail/mail-utils.c	(working copy)
@@ -352,7 +352,7 @@
 		const char *attendee;
 		char *text = NULL;
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 		if (!attendee)
 			continue;
 
@@ -379,7 +379,7 @@
 		const char *organizer;
 		char *text = NULL;
 
-		organizer = icalproperty_get_value_as_string (prop);
+		organizer = icalproperty_get_value_as_string_r (prop);
 		if (organizer) {
 			if (!g_ascii_strncasecmp (organizer, "mailto:", 7))
 				text = g_strdup (organizer+7);
@@ -425,7 +425,7 @@
 	}
 
 	/* Put the updated ical string back into the body */
-	str = icalcomponent_as_ical_string (vcal_comp);
+	str = icalcomponent_as_ical_string_r (vcal_comp);
 	ical_str = e2k_lf_to_crlf (str);
 	g_free (str);
 	newlen = strlen (ical_str);
Index: calendar/e-cal-backend-exchange.c
===================================================================
--- calendar/e-cal-backend-exchange.c	(revision 1845)
+++ calendar/e-cal-backend-exchange.c	(working copy)
@@ -302,7 +302,7 @@
 	vcalcomp = e_cal_util_new_top_level ();
 	g_hash_table_foreach (cbex->priv->timezones, save_timezone, vcalcomp);
 	g_hash_table_foreach (cbex->priv->objects, save_object, vcalcomp);
-	data = icalcomponent_as_ical_string (vcalcomp);
+	data = icalcomponent_as_ical_string_r (vcalcomp);
 	icalcomponent_free (vcalcomp);
 
 	tmpfile = g_strdup_printf ("%s~", cbex->priv->object_cache_file);
@@ -647,8 +647,8 @@
 		char *str = NULL;
 		/* FIXME somehow the query does not match with the component in some cases, so user needs to press a
 		   clear to get rid of the component from the view in that case*/
-		str = icalcomponent_as_ical_string (ecomp->icomp);
-		e_cal_backend_notify_object_removed (backend, id, icalcomponent_as_ical_string (ecomp->icomp)
+		str = icalcomponent_as_ical_string_r (ecomp->icomp);
+		e_cal_backend_notify_object_removed (backend, id, icalcomponent_as_ical_string_r (ecomp->icomp)
 				, NULL);
 		g_free (str);
 	}
@@ -950,7 +950,7 @@
 		}
 
 		if (inst_found) {
-			*object = icalcomponent_as_ical_string (l->data);
+			*object = icalcomponent_as_ical_string_r (l->data);
 		} else {
 			/* Instance is not found. Send the master object instead */
 			if (ecomp->icomp) {
@@ -964,7 +964,7 @@
 					return GNOME_Evolution_Calendar_ObjectNotFound;
 				}
 
-				*object = icalcomponent_as_ical_string (new_inst);
+				*object = icalcomponent_as_ical_string_r (new_inst);
 				icalcomponent_free (new_inst);
 			} else {
 				/* Oops. No instance and no master as well !! */
@@ -987,11 +987,11 @@
 					icalcomponent_new_clone (ecomp->icomp));
 			g_list_foreach (ecomp->instances, (GFunc) add_instances_to_vcal, vcalcomp);
 
-			*object = icalcomponent_as_ical_string (vcalcomp);
+			*object = icalcomponent_as_ical_string_r (vcalcomp);
 			icalcomponent_free (vcalcomp);
 		} else {
 			/* There are no detached instances. Send only the master object */
-			*object = icalcomponent_as_ical_string (ecomp->icomp);
+			*object = icalcomponent_as_ical_string_r (ecomp->icomp);
 		}
 	}
 	g_mutex_unlock (cbex->priv->cache_lock);
@@ -1084,7 +1084,7 @@
 	d(printf("ecbe_get_default_object(%p, %p)\n", backend, cal));
 
 	comp = e_cal_util_new_component (e_cal_backend_get_kind (E_CAL_BACKEND (backend)));
-	ical_obj = icalcomponent_as_ical_string (comp);
+	ical_obj = icalcomponent_as_ical_string_r (comp);
 	*object = ical_obj;
 
 	icalcomponent_free (comp);
@@ -1213,7 +1213,7 @@
 	if (!vtzcomp)
 		return GNOME_Evolution_Calendar_OtherError;
 
-	ical_obj = icalcomponent_as_ical_string (vtzcomp);
+	ical_obj = icalcomponent_as_ical_string_r (vtzcomp);
 	*object = ical_obj;
 
 	return  GNOME_Evolution_Calendar_Success;
@@ -1794,7 +1794,7 @@
 		const char *organizer;
 		char *text = NULL;
 
-		organizer = icalproperty_get_value_as_string (prop);
+		organizer = icalproperty_get_value_as_string_r (prop);
 		if (organizer) {
 			if (!g_ascii_strncasecmp (organizer, "mailto:", 7))
 				text = g_strdup (organizer+7);
@@ -1819,7 +1819,7 @@
 		const char *attendee;
 		char *text = NULL;
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 		if (!attendee)
 			continue;
 
Index: calendar/e-cal-backend-exchange-tasks.c
===================================================================
--- calendar/e-cal-backend-exchange-tasks.c	(revision 1845)
+++ calendar/e-cal-backend-exchange-tasks.c	(working copy)
@@ -831,7 +831,7 @@
 			e_cal_backend_exchange_cache_unlock (cbex);
 
 			if (status && kind == ICAL_VTODO_COMPONENT) {
-				char *str = icalcomponent_as_ical_string (icalcomp);
+				char *str = icalcomponent_as_ical_string_r (icalcomp);
 				e_cal_backend_notify_object_created (E_CAL_BACKEND (cbex), str);
 				g_free (str);
 			}
@@ -1365,7 +1365,7 @@
                         char *returned_uid;
 
 			e_cal_backend_exchange_cache_unlock (cbex);
-			calobj = (char *) icalcomponent_as_ical_string (subcomp);
+			calobj = (char *) icalcomponent_as_ical_string_r (subcomp);
 			status = create_task_object (backend, cal, &calobj, &returned_uid);
                         if (status != GNOME_Evolution_Calendar_Success) {
 				g_free (calobj);
Index: calendar/e-cal-backend-exchange-calendar.c
===================================================================
--- calendar/e-cal-backend-exchange-calendar.c	(revision 1845)
+++ calendar/e-cal-backend-exchange-calendar.c	(working copy)
@@ -246,7 +246,7 @@
 		status = add_vevent (cbex, href, lastmod, icalcomp);
 
 		if (status) {
-			char *object = icalcomponent_as_ical_string (icalcomp);
+			char *object = icalcomponent_as_ical_string_r (icalcomp);
 			e_cal_backend_notify_object_created (backend, object);
 			g_free (object);
 		}
@@ -289,7 +289,7 @@
 			status = add_vevent (cbex, href, lastmod, new_comp);
 
 			if (status) {
-				char *object = icalcomponent_as_ical_string (new_comp);
+				char *object = icalcomponent_as_ical_string_r (new_comp);
 				e_cal_backend_notify_object_created (backend, object);
 				g_free (object);
 			}
@@ -686,7 +686,7 @@
 		const char *attendee;
 		char *text = NULL;
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 		if (!attendee)
 			continue;
 
@@ -856,7 +856,7 @@
 	icalcomponent_foreach_tzid (real_icalcomp, add_timezone_cb, cbdata);
 	icalcomponent_add_component (cbdata->vcal_comp, real_icalcomp);
 
-	body = icalcomponent_as_ical_string (cbdata->vcal_comp);
+	body = icalcomponent_as_ical_string_r (cbdata->vcal_comp);
 	body_crlf = e_cal_backend_exchange_lf_to_crlf (body);
 	g_free (body);
 
@@ -1379,12 +1379,12 @@
 	e_cal_backend_exchange_cache_unlock (cbex);
 
 	if (!cached_ecomp && remove)
-		*new_object = icalcomponent_as_ical_string (icalcomp);
+		*new_object = icalcomponent_as_ical_string_r (icalcomp);
 
 	if (!remove && mod == CALOBJ_MOD_THIS)
 		icalcomponent_add_component (cbdata->vcal_comp, real_icalcomp);
 
-	body = icalcomponent_as_ical_string (cbdata->vcal_comp);
+	body = icalcomponent_as_ical_string_r (cbdata->vcal_comp);
 	body_crlf = e_cal_backend_exchange_lf_to_crlf (body);
 	g_free (body);
 
@@ -1532,7 +1532,7 @@
 		/*remove a single instance of a recurring event and modify */
 		time_rid = icaltime_from_string (rid);
 		e_cal_util_remove_instances (ecomp->icomp, time_rid, mod);
-		calobj  = (char *) icalcomponent_as_ical_string (ecomp->icomp);
+		calobj  = (char *) icalcomponent_as_ical_string_r (ecomp->icomp);
 
 		e_cal_backend_exchange_cache_unlock (cbex);
 		ebs_status = modify_object_with_href (backend, cal, calobj, mod, &obj, &new_object, NULL, rid);
@@ -1669,7 +1669,7 @@
 					if (e_cal_util_component_is_instance (subcomp))
 						mod = CALOBJ_MOD_THIS;
 
-					icalobj = (char *) icalcomponent_as_ical_string (subcomp);
+					icalobj = (char *) icalcomponent_as_ical_string_r (subcomp);
 					status = modify_object_with_href (backend, cal, icalobj,
 									  mod,
 									  &old_object, &new_object, NULL, NULL);
@@ -1690,7 +1690,7 @@
 			} else if (!check_owner_partstatus_for_declined (backend, subcomp)) {
 				char *returned_uid, *object;
 				d(printf ("object : %s .. not found in the cache\n", uid));
-				icalobj = (char *) icalcomponent_as_ical_string (subcomp);
+				icalobj = (char *) icalcomponent_as_ical_string_r (subcomp);
 				d(printf ("Create a new object : %s\n", icalobj));
 
 				e_cal_backend_exchange_cache_unlock (cbex);
@@ -1715,7 +1715,7 @@
 			break;
 
 		case ICAL_METHOD_CANCEL:
-			icalobj = (char *) icalcomponent_as_ical_string (subcomp);
+			icalobj = (char *) icalcomponent_as_ical_string_r (subcomp);
 			if (rid)
 				status = remove_object (backend, cal, uid, rid, CALOBJ_MOD_THIS, &icalobj, &object);
 			else
@@ -2349,7 +2349,7 @@
 		content = (char *) fbdata->children->content;
 		set_freebusy_info (vfb, content, start);
 
-		calobj = icalcomponent_as_ical_string (vfb);
+		calobj = icalcomponent_as_ical_string_r (vfb);
 		*freebusy = g_list_prepend (*freebusy, calobj);
 		icalcomponent_free (vfb);
 	}
