summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-07-16 14:52:42 +0200
committerAndreas Schneider <asn@samba.org>2010-07-19 12:59:18 +0200
commit5cefbfef26bf2d5f470f1d8c52d75e9756c0f738 (patch)
treee68e42882b0dd51a29240ff936097ff0e6a54981 /source3/wscript
parentb91e5cf17d09e4e8bf73e78b96f69831a7cb0d0b (diff)
downloadsamba-5cefbfef26bf2d5f470f1d8c52d75e9756c0f738.tar.gz
samba-5cefbfef26bf2d5f470f1d8c52d75e9756c0f738.tar.bz2
samba-5cefbfef26bf2d5f470f1d8c52d75e9756c0f738.zip
s3-rpc_server: Added callbacks for init and shutdown of a rpc service.
This adds two callback function for each rpc service. One is for initialisation and the other for shutdown. rpc_<service>_unregister() needs to be called to execute the shutdown function.
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript20
1 files changed, 14 insertions, 6 deletions
diff --git a/source3/wscript b/source3/wscript
index 0b31563343..66bddcf858 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -321,12 +321,20 @@ utimensat vsyslog _write __write __xstat
conf.env[shared_env] = []
if p in static_list:
decl_list=""
- for entry in static_list[p]:
- decl_list += "extern NTSTATUS %s_init(void); " % entry
- conf.env[static_env].append('%s' % entry.upper())
- decl_list = decl_list.rstrip()
- conf.DEFINE('static_decl_%s' % p, decl_list)
- conf.DEFINE('static_init_%s' % p, '{ %s_init(); }' % '_init(); '.join(static_list[p]))
+ if p == "rpc":
+ for entry in static_list[p]:
+ decl_list += "extern NTSTATUS %s_init(const struct rpc_srv_callbacks *rpc_srv_cb); " % entry
+ conf.env[static_env].append('%s' % entry.upper())
+ decl_list = decl_list.rstrip()
+ conf.DEFINE('static_decl_%s' % p, decl_list)
+ conf.DEFINE('static_init_%s' % p, '{ %s_init(NULL); }' % '_init(NULL); '.join(static_list[p]))
+ else:
+ for entry in static_list[p]:
+ decl_list += "extern NTSTATUS %s_init(void); " % entry
+ conf.env[static_env].append('%s' % entry.upper())
+ decl_list = decl_list.rstrip()
+ conf.DEFINE('static_decl_%s' % p, decl_list)
+ conf.DEFINE('static_init_%s' % p, '{ %s_init(); }' % '_init(); '.join(static_list[p]))
else:
conf.DEFINE('static_decl_%s' % p, '')
conf.DEFINE('static_init_%s' % p, '{}')