[PATCH] add smb_register_*_event()

Jelmer Vernooij jelmer at samba.org
Mon Apr 28 18:34:29 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 28 April 2003 07:42, Stefan (metze) Metzmacher wrote:
> At 03:53 28.04.2003 +0200, Jelmer Vernooij wrote:
> >On Sat, Apr 26, 2003 at 03:32:06PM +0200, Stefan (metze) Metzmacher wrote
> >
> >about 'Re: [PATCH] add smb_register_*_event()':
> > > At 21:31 24.04.2003 +0200, Stefan (metze) Metzmacher wrote:
> > > >Hi Jelmer,
> > > >
> > > >here's a patch for the smb_register_idle_event() and
> > > >smb_register_exit_event() functions.
> > > >
> > > >They are suppost to give modules a chance to run function periodicly
> > > >or on server exit.
> > >
> > > Here are new patches witch introduce the smb_run_*events() to the smbd
> > > code...
> >
> >Please don't add version numbers to functions or then the 'normal'
> >register functions. We can't add a seperate function version number
> >for all the functions in samba.
>
> not to all function...
>
> >smb_register_event_handler(event_exit, my_exit_event_handler);
>
> ok
>
> what's about
>
> NTSTATUS smb_register_event(uint16 version, smb_event_struct *event);
>
> or if you really want
>
> NTSTATUS smb_register_event(smb_event_struct *event);
>
> and
>
> enum smb_event_type (SMB_EVENT_TYPE_EXIT,SMB_EVENT_TYPE_IDLE);
>
> typedef struct smb_event_struct {
>          struct smb_event_struct *prev,*next;
>          enum smb_event_type type;
>          time_t last_run;
>          time_t interval;
>          void *data;
>          void (*fn)(struct smb_event_struct **event, time_t now);
> } smb_event_struct;
Sorry, my mistake, I forgot about the interval value. Can you resend the patch 
without the versioning stuff? 

Btw, where would the idle_event be used for currently? Anything in particular 
that would/could use it?

Jelmer

- -- 
Jelmer Vernooij                                      <jelmer at samba.org>
~/.plan: 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+rXQ2Pa9Uoh7vUnYRAikXAJ9CBE/okwHsoRxl8qUoZo1vde+LvwCdHf2m
iENfp4Im77BJzPGNgWSPBeA=
=2XGx
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list