register events

Stefan (metze) Metzmacher metze at
Tue May 6 11:00:08 GMT 2003

At 12:49 06.05.2003 +0200, Jelmer Vernooij wrote:
>On Tue, May 06, 2003 at 12:31:58PM +0200, Stefan (metze) Metzmacher wrote 
>about 'Re: register events':
> > At 11:47 06.05.2003 +0200, Jelmer Vernooij wrote:
> > >On Tue, May 06, 2003 at 07:10:37AM +0200, Stefan (metze) Metzmacher wrote
> > >about 'register events':
> > >> thanks for applying my patch:-)
> > >> But there's one thing I didn't understand...
> > >> Why have you remove the check if an event tries to register twice???
> > >> We have to avoid this!!! Otherwise we'll get a corrupted list!!
> > >> When the same event struct pointer will be registered twice....
> > >You only check whether the pointer is already there.
> > Yep, that's what we need to do!
> > A DLIST deal with this pointers and if the same struct (same memoryblock)
> > will be added twice with DLIST_ADD() the list is corrupted!...
>Wouldn't it be more useful to just be able to pass a function pointer
>and a void *data pointer to the register function and let the register
>function worry about the allocation of the event struct? That's more
>clean imho.

If you have a good way to unregister events.
(and also let the registration of two events with the same fn pointer possible)
I'd would :-)

Stefan "metze" Metzmacher <metze at> 

More information about the samba-technical mailing list