diff options
author | Jim McDonough <jmcd@samba.org> | 2003-01-17 20:57:26 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2003-01-17 20:57:26 +0000 |
commit | 9eb368e068076f65083916573cf832988e216b59 (patch) | |
tree | fb9cb68de693b1ac563abb748f899aebae6890de /source3/rpc_server/srv_wkssvc.c | |
parent | 8305409e797f9b62dad0720141ca8ed2f802a22b (diff) | |
download | samba-9eb368e068076f65083916573cf832988e216b59.tar.gz samba-9eb368e068076f65083916573cf832988e216b59.tar.bz2 samba-9eb368e068076f65083916573cf832988e216b59.zip |
Enable dynamic loading of RPC modules. See docs/textdocs/RPC_PLUGGIN.txt for instructions.
(This used to be commit d51e12df78ff8fc721d693fedbd1c633f39edd49)
Diffstat (limited to 'source3/rpc_server/srv_wkssvc.c')
-rw-r--r-- | source3/rpc_server/srv_wkssvc.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source3/rpc_server/srv_wkssvc.c b/source3/rpc_server/srv_wkssvc.c index c783becbbe..1fed2cc6db 100644 --- a/source3/rpc_server/srv_wkssvc.c +++ b/source3/rpc_server/srv_wkssvc.c @@ -3,7 +3,8 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. + * Copyright (C) Paul Ashton 1997, + * Copyright (C) Anthony Liguori 2003. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,16 +59,17 @@ static BOOL api_wks_query_info(pipes_struct *p) /******************************************************************* \PIPE\wkssvc commands ********************************************************************/ -static struct api_struct api_wks_cmds[] = -{ - { "WKS_Q_QUERY_INFO", WKS_QUERY_INFO, api_wks_query_info }, - { NULL , 0 , NULL } -}; -/******************************************************************* - receives a wkssvc pipe and responds. - ********************************************************************/ -BOOL api_wkssvc_rpc(pipes_struct *p) +#ifdef RPC_WKS_DYNAMIC +int rpc_pipe_init(void) +#else +int rpc_wks_init(void) +#endif { - return api_rpcTNP(p, "api_wkssvc_rpc", api_wks_cmds); + static struct api_struct api_wks_cmds[] = + { + { "WKS_Q_QUERY_INFO", WKS_QUERY_INFO, api_wks_query_info } + }; + return rpc_pipe_register_commands("wkssvc", "ntsvcs", api_wks_cmds, + sizeof(api_wks_cmds) / sizeof(struct api_struct)); } |