r55: if you try to use a custom bind or unbind hook in
authorStefan Metzmacher <metze@samba.org>
Mon, 5 Apr 2004 16:06:33 +0000 (16:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:50:40 +0000 (12:50 -0500)
commitae97f5f50b0d00889f29e1903513cee88891545d
tree4fd4405db553d44e6d4270e2d8a5a64f059bfac8
parent9f13b7c60cc7e6edd095eee96625ee02cd0dd73b
r55: if you try to use a custom bind or unbind hook in
a dcesrv module and also use the autogenerated boilerplate
you can just use:

#define DCESRV_INTERFACE_<UPPERCASE_INTERFACE_NAME>_BIND <interface_name>_bind
#define DCESRV_INTERFACE_<UPPERCASE_INTERFACE_NAME>_UNBIND <interface_name>_unbind

the prototype for the functions are the same as in
struct dcesrv_interface {
...
/* this function is called when the client binds to this interface  */
NTSTATUS (*bind)(struct dcesrv_call_state *, const struct dcesrv_interface *);

/* this function is called when the client disconnects the endpoint */
void (*unbind)(struct dcesrv_connection *, const struct dcesrv_interface *);
...
};

e.g.

#define DCESRV_INTERFACE_WINREG_BIND winreg_bind
#define DCESRV_INTERFACE_WINREG_UNBIND winreg_unbind

metze
source/build/pidl/server.pm