From 5cefbfef26bf2d5f470f1d8c52d75e9756c0f738 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 16 Jul 2010 14:52:42 +0200 Subject: 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__unregister() needs to be called to execute the shutdown function. --- source3/wscript | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'source3/wscript') 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, '{}') -- cgit