summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss.c
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-01-17 20:57:26 +0000
committerJim McDonough <jmcd@samba.org>2003-01-17 20:57:26 +0000
commit9eb368e068076f65083916573cf832988e216b59 (patch)
treefb9cb68de693b1ac563abb748f899aebae6890de /source3/rpc_server/srv_spoolss.c
parent8305409e797f9b62dad0720141ca8ed2f802a22b (diff)
downloadsamba-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_spoolss.c')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 5924c5831b..5832ae876b 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -3,9 +3,10 @@
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-2000,
* Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
- * Copyright (C) Jean François Micouleau 1998-2000.
- * Copyright (C) Jeremy Allison 2001.
- * Copyright (C) Gerald Carter 2001-2002.
+ * Copyright (C) Jean François Micouleau 1998-2000,
+ * Copyright (C) Jeremy Allison 2001,
+ * Copyright (C) Gerald Carter 2001-2002,
+ * 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
@@ -1579,8 +1580,14 @@ static BOOL api_spoolss_replycloseprinter(pipes_struct *p)
\pipe\spoolss commands
********************************************************************/
-struct api_struct api_spoolss_cmds[] =
+#ifdef RPC_SPOOLSS_DYNAMIC
+int rpc_pipe_init(void)
+#else
+int rpc_spoolss_init(void)
+#endif
{
+ struct api_struct api_spoolss_cmds[] =
+ {
{"SPOOLSS_OPENPRINTER", SPOOLSS_OPENPRINTER, api_spoolss_open_printer },
{"SPOOLSS_OPENPRINTEREX", SPOOLSS_OPENPRINTEREX, api_spoolss_open_printer_ex },
{"SPOOLSS_GETPRINTERDATA", SPOOLSS_GETPRINTERDATA, api_spoolss_getprinterdata },
@@ -1634,15 +1641,9 @@ struct api_struct api_spoolss_cmds[] =
{"SPOOLSS_DELETEPRINTERDRIVEREX", SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_deleteprinterdriverex },
#if 0
{"SPOOLSS_REPLYOPENPRINTER", SPOOLSS_REPLYOPENPRINTER, api_spoolss_replyopenprinter },
- {"SPOOLSS_REPLYCLOSEPRINTER", SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_replycloseprinter },
+ {"SPOOLSS_REPLYCLOSEPRINTER", SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_replycloseprinter }
#endif
- { NULL, 0, NULL }
-};
-
-/*******************************************************************
-receives a spoolss pipe and responds.
-********************************************************************/
-BOOL api_spoolss_rpc(pipes_struct *p)
-{
- return api_rpcTNP(p, "api_spoolss_rpc", api_spoolss_cmds);
+ };
+ return rpc_pipe_register_commands("spoolss", "spoolss", api_spoolss_cmds,
+ sizeof(api_spoolss_cmds) / sizeof(struct api_struct));
}