Re: [evolution-patches] 55389



On Wed, 2004-03-10 at 15:12 -0500, JP Rosevear wrote:

> On Wed, 2004-03-10 at 10:59, Rodrigo Moya wrote:
> > On Wed, 2004-03-10 at 10:42 -0500, JP Rosevear wrote:
> > 
> > > On Wed, 2004-03-10 at 07:07, Rodrigo Moya wrote:
> > > > On Tue, 2004-03-09 at 18:52 -0500, JP Rosevear wrote:
> > > > 
> > > > hmm, I thought send_objects should return only the objects it modified.
> > > > If that's not the case, the patch looks ok.
> > > 
> > > Committed.
> > > 
> > the same patch but for the contacts and http backends.
> 
> I think you don't need to do it for those two because they are both read
> only and hence should return an error code like the http one does.  
> 
> We should however guard against NULL in notify routine so that if there
> is an error we don't try to send back a NULL via CORBA.
> 
right, attached patch fixes both of them.

cheers
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.202
diff -u -p -r1.202 ChangeLog
--- ChangeLog	10 Mar 2004 15:48:21 -0000	1.202
+++ ChangeLog	11 Mar 2004 12:32:30 -0000
@@ -1,3 +1,12 @@
+2004-03-11  Rodrigo Moya <rodrigo ximian com>
+
+	* libedata-cal/e-data-cal.c (e_data_cal_notify_objects_sent): guard
+	against sending NULL strings to CORBA.
+
+	* backends/contacts/e-cal-backend-contacts.c
+	(e_cal_backend_contacts_receive_objects,
+	e_cal_backend_contacts_send_objects): return PermissionDenied error.
+
 2004-03-09  JP Rosevear <jpr ximian com>
 
 	Fixes #55389
Index: libedata-cal/e-data-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-data-cal.c,v
retrieving revision 1.6
diff -u -p -r1.6 e-data-cal.c
--- libedata-cal/e-data-cal.c	1 Mar 2004 15:46:01 -0000	1.6
+++ libedata-cal/e-data-cal.c	11 Mar 2004 12:32:30 -0000
@@ -912,7 +912,8 @@ e_data_cal_notify_objects_sent (EDataCal
 	}
 
 	CORBA_exception_init (&ev);
-	GNOME_Evolution_Calendar_CalListener_notifyObjectsSent (priv->listener, status, corba_users, calobj, &ev);
+	GNOME_Evolution_Calendar_CalListener_notifyObjectsSent (priv->listener, status, corba_users,
+								calobj ? calobj : "", &ev);
 
 	if (BONOBO_EX (&ev))
 		g_message (G_STRLOC ": could not notify the listener of objects sent");
Index: backends/contacts/e-cal-backend-contacts.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/contacts/e-cal-backend-contacts.c,v
retrieving revision 1.6
diff -u -p -r1.6 e-cal-backend-contacts.c
--- backends/contacts/e-cal-backend-contacts.c	9 Mar 2004 23:43:46 -0000	1.6
+++ backends/contacts/e-cal-backend-contacts.c	11 Mar 2004 12:32:31 -0000
@@ -592,7 +592,7 @@ static ECalBackendSyncStatus
 e_cal_backend_contacts_receive_objects (ECalBackendSync *backend, EDataCal *cal,
 					const char *calobj)
 {
-	return GNOME_Evolution_Calendar_UnsupportedMethod;	
+	return GNOME_Evolution_Calendar_PermissionDenied;	
 }
 
 static ECalBackendSyncStatus
@@ -602,7 +602,7 @@ e_cal_backend_contacts_send_objects (ECa
 	*users = NULL;
 	*modified_calobj = NULL;
 	/* TODO: Investigate this */
-	return GNOME_Evolution_Calendar_Success;
+	return GNOME_Evolution_Calendar_PermissionDenied;
 }
 
 /* Then the real implementations */


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