[evolution-patches] patch for 50387, Calendar importer related



Hi, Rodrigo and JPR,
Here is a patch for 50387 based on 1.4 branch, import a .cvf to local calendar crashes Evolution. Please review it.
   I wish this ptach can be checked into both HEAD and 1.4 branch.
   Thanks!
      Harry
Index: calendar//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1802.2.35
diff -u -r1.1802.2.35 ChangeLog
--- calendar//ChangeLog	8 Oct 2003 09:32:06 -0000	1.1802.2.35
+++ calendar//ChangeLog	31 Oct 2003 03:40:22 -0000
@@ -1,3 +1,11 @@
+2003-10-31  Harry Lu <harry lu sun com>
+
+	Fix for #50387.
+
+	* importers/icalendar-importer.c: (support_format_fn):
+	Call icalcomponent_is_valid() to check whether the returned 
+	icalcomponent is valid.
+
 2003-10-08  Harry Lu  <harry lu sun com>
 
 	* gui/dialogs/alarm-options.glade: Make repeat-quantity and 
Index: calendar//importers/icalendar-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/importers/icalendar-importer.c,v
retrieving revision 1.20
diff -u -r1.20 icalendar-importer.c
--- calendar//importers/icalendar-importer.c	2 Jun 2003 19:13:45 -0000	1.20
+++ calendar//importers/icalendar-importer.c	31 Oct 2003 03:40:23 -0000
@@ -261,8 +261,11 @@
 	if (contents) {
 		icalcomp = icalparser_parse_string (contents);
 		if (icalcomp) {
+			if (icalcomponent_is_valid (icalcomp))
+				ret = TRUE;
+			else 
+				ret = FALSE;
 			icalcomponent_free (icalcomp);
-			ret = TRUE;
 		}
 	}
 


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