commit 4762cb0ebea9af31feb3cba46b9d3f18a30d11df
Author: JOhnny <jjohnny@jjohnny.blr.novell.com>
Date:   Wed Apr 30 07:02:10 2008 +0530

    Fix for #519284. Tell GC not to free const char*. Fixed Uid & Location properties

diff --git a/ChangeLog b/ChangeLog
index cc9459f..df31695 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-29  Johnny Jacob  <jjohnny@novell.com>
+
+	Fix for Bug #519284/
+	
+	* evolution/src/CalComponent.cs: Tell GC not to free
+	const char*. Fixed Uid & Location properties.
+
 2008-03-10  Johnny Jacob  <jjohnny@novell.com>
 
 	* configure.in: Support for e-d-s-2.22.0 stable release.
diff --git a/evolution/src/CalComponent.cs b/evolution/src/CalComponent.cs
index 0aa338e..e02da12 100644
--- a/evolution/src/CalComponent.cs
+++ b/evolution/src/CalComponent.cs
@@ -181,15 +181,17 @@ namespace Evolution {
 		}
 
 		[DllImport("ecal")]
-			static extern void e_cal_component_get_uid (IntPtr handle, out string uid);
+			static extern void e_cal_component_get_uid (IntPtr handle, out IntPtr uid);
 		[DllImport("ecal")]
 			static extern void e_cal_component_set_uid (IntPtr handle, string uid);
 		
 		public string Uid {
 			get {
-				string uid = "";
-				e_cal_component_get_uid (Handle, out uid);
-				return uid;
+				IntPtr uid;
+			    	e_cal_component_get_uid (Handle, out uid);
+			    	string managed_uid = Marshal.PtrToStringAnsi (uid);
+
+			    	return managed_uid;
 			}
 			set {
 				e_cal_component_set_uid (Handle, value);
@@ -271,15 +273,17 @@ namespace Evolution {
 		}
 
 		[DllImport("ecal")]
-			static extern void e_cal_component_get_location (IntPtr raw, out string location);
+			static extern void e_cal_component_get_location (IntPtr raw, out IntPtr location);
 		[DllImport("ecal")]
 			static extern void e_cal_component_set_location (IntPtr raw, string location);
 
 		public string Location {
 			get {
-				string location = "";
+				IntPtr location;
 				e_cal_component_get_location (Handle, out location);
-				return location;
+				string managed_location = Marshal.PtrToStringAnsi (location);
+
+				return managed_location;
 			}
 			set {
 				e_cal_component_set_location (Handle, value);
