r1501: One more check for option != 0.
[jra/samba/.git] / source3 / rpc_server / srv_spoolss.c
index 5832ae876bfed0f59e03b75ae685179b73b1c6fe..f846813a40b86be85dc653b428e60ae4f316fc47 100755 (executable)
@@ -6,7 +6,7 @@
  *  Copyright (C) Jean François Micouleau      1998-2000,
  *  Copyright (C) Jeremy Allison                    2001,
  *  Copyright (C) Gerald Carter                2001-2002,
- *  Copyright (C) Anthony Liguori                   2003.
+ *  Copyright (C) Jim McDonough <jmcd@us.ibm.com>   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
@@ -141,7 +141,7 @@ static BOOL api_spoolss_deleteprinterdata(pipes_struct *p)
                return False;
        }
        
-       r_u.status = _spoolss_deleteprinterdata( p, &q_u, &r_u);
+       r_u.status = _spoolss_deleteprinterdata( p, &q_u, &r_u );
 
        if (!spoolss_io_r_deleteprinterdata("", &r_u, rdata, 0)) {
                DEBUG(0,("spoolss_io_r_deleteprinterdata: unable to marshall SPOOL_R_DELETEPRINTERDATA.\n"));
@@ -1580,12 +1580,6 @@ static BOOL api_spoolss_replycloseprinter(pipes_struct *p)
 \pipe\spoolss commands
 ********************************************************************/
 
-#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              },
@@ -1644,6 +1638,15 @@ int rpc_spoolss_init(void)
  {"SPOOLSS_REPLYCLOSEPRINTER",         SPOOLSS_REPLYCLOSEPRINTER,         api_spoolss_replycloseprinter         }
 #endif
     };
-  return rpc_pipe_register_commands("spoolss", "spoolss", api_spoolss_cmds,
+
+void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns )
+{
+       *fns = api_spoolss_cmds;
+       *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_spoolss_init(void)
+{
+  return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", api_spoolss_cmds,
                                    sizeof(api_spoolss_cmds) / sizeof(struct api_struct));
 }