Re: fix for the bug #329866 [calendar]

chen <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Attached the updated one.

thanks, Chenthill.
On Mon, 2006-02-13 at 11:01 +0530, Harish Krishnaswamy wrote:
> > + const char *i_rid = NULL, d_rid = NULL;
> 
> d_rid should be a const char *.
> 
> > +
> > +                               i_rid =
> > e_cal_component_get_recurid_as_string (ci->comp);
> > +                               cid->comp =
> > e_cal_component_get_recurid_as_string (cid->comp);
> > +
> > +                               if (i_rid && d_rid && strcmp
> > (e_cal_component_get_recurid_as_string (ci->comp),
> > 
> 
> d_rid is never assigned a value and will cause the if condition to be
> FALSE always.
> 
> Can you pl. rework the same.
> 
> Harish

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
329866.diff (text/x-patch, 1.6 KB)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.560
diff -u -p -u -p -r1.560 ChangeLog
--- ChangeLog	10 Feb 2006 06:36:08 -0000	1.560
+++ ChangeLog	13 Feb 2006 05:35:41 -0000
@@ -1,3 +1,9 @@
+2006-02-13  Chenthill Palanisamy  <[email protected]>
+
+	Fixes #329866
+	* libecal/e-cal.c: (process_detached_instances): Check if we have
+	valid recurrence id before comparing.
+
 2006-02-12  Chenthill Palanisamy  <[email protected]>
 
 	Fixes #329566, #329568
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.123
diff -u -p -u -p -r1.123 e-cal.c
--- libecal/e-cal.c	12 Jan 2006 09:42:53 -0000	1.123
+++ libecal/e-cal.c	13 Feb 2006 05:35:44 -0000
@@ -3514,8 +3518,12 @@ process_detached_instances (GList *insta
 			e_cal_component_get_uid (ci->comp, &instance_uid);
 			e_cal_component_get_recurid (ci->comp, &instance_recur_id);
 			if (strcmp (uid, instance_uid) == 0) {
-				if (strcmp (e_cal_component_get_recurid_as_string (ci->comp),
-					    e_cal_component_get_recurid_as_string (cid->comp)) == 0) {
+				const char *i_rid = NULL, *d_rid = NULL;
+
+				i_rid = e_cal_component_get_recurid_as_string (ci->comp);
+				d_rid = e_cal_component_get_recurid_as_string (cid->comp);
+
+				if (i_rid && d_rid && strcmp (i_rid, d_rid) == 0) {
 					g_object_unref (ci->comp);
 					ci->comp = g_object_ref (cid->comp);
 					ci->start = cid->start;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.