Re: [evolution-patches] Re: rework of EComponentListener



BTW I think this should go in after 1.4, but not now.  It looks like a
potentially dangerous change, esp. for Connector that is out of process.

On Wed, 2003-05-28 at 07:32, Rodrigo Moya wrote:
> On Tue, 2003-05-27 at 10:22, Michael Meeks wrote:
> > > Michael, please could you have a look at the e-util patch?
> > ...
> > > I'll hold on this patch (if approved) a few days to make sure there are
> > > no additional problems. So far, it seems to work ok for me.
> > 
> > 	So - just a few comments; firstly there are (unfortunately) a few
> > Gotchas with the 'listen_for_broken' API - inasmuch that the connection
> > is shared between all CORBA_Objects talking to the same process; which
> > is fine - but it makes the 'unlisten' totally useless [ unfortunately ]
> > - since you can only unlisten on a callback [ which cocks up all the
> > other listeners ;-].
> > 
> > 	Thus - as you have done, it is by far the best to have a list of
> > servers; and to do the ORBit_small_get_connection_status on them
> > iteratively. However (it seems) you also put the EComponentListener
> > pointer into the closure for the callback - whence it cannot be removed
> > safely.
> > 
> > 	So - I would suggest two things:
> > 
> > 	* don't pass the *cl closure in,
> > 	* simply iterate over the watched_connections list on broken, 
> > 	  checking for DISCONNECTED, and removing the connection
> > 	* don't forget to use the:
> > 
> > 	GList *l, *next;
> > 	for (l = start; l; l = next) {
> > 		next = l->next;
> > 		if (foo)
> > 			start = g_list_delete (start, l);
> > 	}
> > 
> > 	type pattern or you'll wander onto the free'd list node heap ;-)
> > 
> ok, updated patch attached.
> 
> cheers



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