diff options
author | Luke Leighton <lkcl@samba.org> | 2000-01-16 04:01:59 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-01-16 04:01:59 +0000 |
commit | 66b5e490dea571e0d3d635ce5cb342078c3a1f61 (patch) | |
tree | bd1cf0019b27bbc50113a88a8ea8cfb7c2227511 /source/spoolssd/spoolssd.c | |
parent | 315f30e03fb784c2ae8fb57a30a0f9c420ca9968 (diff) | |
download | samba-66b5e490dea571e0d3d635ce5cb342078c3a1f61.tar.gz samba-66b5e490dea571e0d3d635ce5cb342078c3a1f61.tar.xz samba-66b5e490dea571e0d3d635ce5cb342078c3a1f61.zip |
higher order function table to set up msrpc services.
Diffstat (limited to 'source/spoolssd/spoolssd.c')
-rw-r--r-- | source/spoolssd/spoolssd.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/source/spoolssd/spoolssd.c b/source/spoolssd/spoolssd.c index d08ed3e6dbb..3814b9c4ee0 100644 --- a/source/spoolssd/spoolssd.c +++ b/source/spoolssd/spoolssd.c @@ -30,14 +30,14 @@ extern BOOL append_log; /***************************************************************************** initialise srv_auth_fns array *****************************************************************************/ -void msrpc_auth_init(rpcsrv_struct *l) +static void auth_init(rpcsrv_struct *l) { } /************************************************************************* initialise an msrpc service *************************************************************************/ -void msrpc_service_init(char* service_name) +static void service_init(char* service_name) { add_msrpc_command_processor( pipe_name, service_name, api_spoolss_rpc ); init_printer_hnd(); /* for SPOOLSS handles */ @@ -46,7 +46,7 @@ void msrpc_service_init(char* service_name) /**************************************************************************** reload the services file **************************************************************************/ -BOOL reload_services(BOOL test) +static BOOL reload_msrpc(BOOL test) { BOOL ret; @@ -72,7 +72,7 @@ BOOL reload_services(BOOL test) /* perhaps the config filename is now set */ if (!test) - reload_services(True); + reload_msrpc(True); reopen_logs(); @@ -84,7 +84,7 @@ BOOL reload_services(BOOL test) /**************************************************************************** main program ****************************************************************************/ - int main(int argc,char *argv[]) +static int main_init(int argc,char *argv[]) { #ifdef HAVE_SET_AUTH_PARAMETERS set_auth_parameters(argc,argv); @@ -103,5 +103,18 @@ BOOL reload_services(BOOL test) fstrcpy(pipe_name, "spoolss"); slprintf(debugf, sizeof(debugf), "%s/log.%s", LOGFILEBASE, pipe_name); - return msrpc_main(argc, argv); + return 0; +} + +static msrpc_service_fns fn_table = +{ + auth_init, + service_init, + reload_msrpc, + main_init +}; + +msrpc_service_fns *get_service_fns(void) +{ + return &fn_table; } |