register events

Jelmer Vernooij jelmer at samba.org
Tue May 6 09:47:22 GMT 2003


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. If a module
constructs an event struct itself the memory address is different each
time so we don't detect events registered twice. We could check for
duplicate function pointers, but I don't think that is necessary.

> And really should not trust the modules...
Events will be registered in init_module(), after other stuff has been
registered. If that stuff fails, we shouldn't register the exit and
interval events. It's the problem of the module, really.

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/e2c96b9d/attachment.bin


More information about the samba-technical mailing list