register events

Jelmer Vernooij jelmer at samba.org
Tue May 6 10:49:27 GMT 2003


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.

Jelmer

-- 
Jelmer Vernooij                                      <jelmer at samba.org>
~/.plan: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030506/3207b780/attachment.bin


More information about the samba-technical mailing list