Re: [evolution-patches] fix-309499



hi

sending the revised patch ..
please review.

regards.

On Fri, 2005-08-05 at 11:49 +0530, Harish Krishnaswamy wrote:
> >                                 continue;               
> >  
> You must be checking for 'delegate' here.                       
> > +                       if(attendee->delfrom && *attendee->delfrom)
> > +                               attendee->delfrom = "";
> > +       
> >                         recipient = g_new0 (EGwItemRecipient, 1);
> >  
> >                         /* len (MAILTO:) + 1 = 7 */
> > @@ -375,6 +378,9 @@ set_attendees_to_item (EGwItem *item, EC
> >                         recipient_list = g_slist_append
> > (recipient_list, recipient);
> >                 }
> >  
> The attendee list needs to be set only if it had been modified.
> So check if you had modified it first.
> > +               /* Reset the ECalComponent with changes */
> > +               e_cal_component_set_attendee_list (comp,
> > attendee_list);        
> > +       
> >                 e_gw_item_set_recipient_list (item, recipient_list);
> The attendee list should be freed using the
> e_cal_component_free_attendee_list function.
> 
> 
> Kindly submit the patch again with the suggested changes.
> 
> Harish
> 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.489
diff -u -p -w -r1.489 ChangeLog
--- ChangeLog	3 Aug 2005 08:34:18 -0000	1.489
+++ ChangeLog	5 Aug 2005 07:00:07 -0000
@@ -1,3 +1,11 @@
+2005-08-05  P. S. Chakravarthi	<pchakravarthi novell com>
+
+	Fixes #309499
+	* backends/groupwise/e-cal-backend-groupwise-utils.c:
+	(set_attendees_to_item): Reset the 'delfrom' parameter to 
+	empty string and set the attendee_list back to the ECalComponent 
+	so that recipient list is build, containing current invitees only.  
+
 2005-08-02  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #310328
Index: backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.60
diff -u -p -w -r1.60 e-cal-backend-groupwise-utils.c
--- backends/groupwise/e-cal-backend-groupwise-utils.c	3 Aug 2005 08:34:18 -0000	1.60
+++ backends/groupwise/e-cal-backend-groupwise-utils.c	5 Aug 2005 07:00:09 -0000
@@ -342,6 +342,9 @@ e_cal_backend_groupwise_set_attachments_
 static void
 set_attendees_to_item (EGwItem *item, ECalComponent *comp, icaltimezone *default_zone, gboolean delegate, const char *user_email)
 {
+	enum modified {YES, NO};
+	enum modified attendee_list_modified = NO;
+
 	if (e_cal_component_has_attendees (comp)) {
 		GSList *attendee_list, *recipient_list = NULL, *al;
 
@@ -353,6 +356,12 @@ set_attendees_to_item (EGwItem *item, EC
 			if (delegate && (g_str_equal (attendee->value + 7, user_email) || !(attendee->delfrom && *attendee->delfrom)))
 				continue;		
 			
+			if(delegate)
+				if(attendee->delfrom && *attendee->delfrom) {
+					attendee->delfrom = "";
+					attendee_list_modified = YES;
+				}
+	
 			recipient = g_new0 (EGwItemRecipient, 1);
 
 			/* len (MAILTO:) + 1 = 7 */
@@ -375,6 +384,10 @@ set_attendees_to_item (EGwItem *item, EC
 			recipient_list = g_slist_append (recipient_list, recipient);
 		}
 
+		/* Reset the ECalComponent with changes if necessary*/
+		if(attendee_list_modified == YES)
+			e_cal_component_set_attendee_list (comp, attendee_list);	
+	
 		e_gw_item_set_recipient_list (item, recipient_list);
 
 		/* Send Options */


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