jelmer at samba.org
Tue May 6 16:01:53 GMT 2003
On Tue, May 06, 2003 at 01:00:08PM +0200, Stefan (metze) Metzmacher wrote about 'Re: register events':
> 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
> >> >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
> I'd would :-)
Can't you just pass the function pointer and the data pointer to the
Jelmer Vernooij <jelmer at samba.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030506/fcb23705/attachment.bin
More information about the samba-technical