[PATCH] add smb_register_*_event()

Stefan (metze) Metzmacher metze at metzemix.de
Tue Apr 29 05:09:31 GMT 2003


At 20:34 28.04.2003 +0200, Jelmer Vernooij wrote:
>-----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?

The last patch?
(with NTSTATUS smb_register_idle_event(smb_idle_event_struct *event) and
NTSTATUS smb_register_exit_event(smb_exit_event_struct *event))


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

Maybe in pdb_ldap to drop an idle connection to the LDAP server.



metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de> 



More information about the samba-technical mailing list