[PATCH] add smb_register_*_event()
Stefan (metze) Metzmacher
metze at metzemix.de
Mon Apr 28 05:42:57 GMT 2003
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;
metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de>
More information about the samba-technical
mailing list