[evolution-patches] fix for the bug #319883 [calendar]
- From: chen <pchenthill novell com>
- To: patches <evolution-patches gnome org>
- Subject: [evolution-patches] fix for the bug #319883 [calendar]
- Date: Tue, 29 Nov 2005 20:03:07 +0530
Hi,
Have attached the fix. Set the object and old_object correctly while
notifying the backend.
thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.530
diff -u -p -r1.530 ChangeLog
--- ChangeLog 28 Nov 2005 19:06:47 -0000 1.530
+++ ChangeLog 29 Nov 2005 14:17:23 -0000
@@ -1,3 +1,11 @@
+2005-11-29 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #319883
+ * backends/file/e-cal-backend-file.c:
+ (cancel_received_object): Fixed a memory leak.
+ (e_cal_backend_file_receive_objects): Send the proper arguments
+ to objects_removed. Fixed a memory leak.
+
2005-11-28 Chenthill Palanisamy <pchenthill novell com>
Fixes #317322
Index: backends/file/e-cal-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file.c,v
retrieving revision 1.67
diff -u -p -r1.67 e-cal-backend-file.c
--- backends/file/e-cal-backend-file.c 28 Nov 2005 19:06:48 -0000 1.67
+++ backends/file/e-cal-backend-file.c 29 Nov 2005 14:17:23 -0000
@@ -2138,6 +2138,7 @@ cancel_received_object (ECalBackendFile
else
remove_component (cbfile, icalcomponent_get_uid (icalcomp), obj_data);
+ g_object_unref (comp);
return TRUE;
}
@@ -2334,7 +2335,7 @@ e_cal_backend_file_receive_objects (ECal
/* Create the cal component */
comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, subcomp);
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (subcomp));
/* Set the created and last modified times on the component */
current = icaltime_from_timet (time (NULL), 0);
@@ -2393,12 +2394,12 @@ e_cal_backend_file_receive_objects (ECal
case ICAL_METHOD_CANCEL:
if (cancel_received_object (cbfile, subcomp)) {
ECalComponentId *id;
- object = (char *) icalcomponent_as_ical_string (subcomp);
+ old_object = e_cal_component_get_as_string (comp);
obj_data = g_hash_table_lookup (priv->comp_uid_hash, uid);
- if (obj_data)
- old_object = e_cal_component_get_as_string (obj_data->full_object);
+ if (obj_data && obj_data->full_object)
+ object = e_cal_component_get_as_string (obj_data->full_object);
else
- old_object = NULL;
+ object = NULL;
id = e_cal_component_get_id (comp);
@@ -2409,6 +2410,7 @@ e_cal_backend_file_receive_objects (ECal
icalcomponent_free (subcomp);
e_cal_component_free_id (id);
+ g_free (object);
g_free (old_object);
}
break;
@@ -2416,6 +2418,7 @@ e_cal_backend_file_receive_objects (ECal
status = GNOME_Evolution_Calendar_UnsupportedMethod;
goto error;
}
+ g_object_unref (comp);
}
g_list_free (comps);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]