s3-spoolss: use pidl for _spoolss_ResetPrinter.
authorGünther Deschner <gd@samba.org>
Tue, 17 Feb 2009 03:28:54 +0000 (04:28 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 17 Feb 2009 09:52:31 +0000 (10:52 +0100)
Guenther

source3/rpc_server/srv_spoolss.c
source3/rpc_server/srv_spoolss_nt.c

index 4a29e1963bd048aec3cfffea33f78aa56026fdf0..c5d20e0d3d1e6f0d4e4dcef3c6f9215677bacf9b 100644 (file)
@@ -658,27 +658,7 @@ static bool api_spoolss_setprinterdata(pipes_struct *p)
 ****************************************************************************/
 static bool api_spoolss_reset_printer(pipes_struct *p)
 {
-       SPOOL_Q_RESETPRINTER q_u;
-       SPOOL_R_RESETPRINTER r_u;
-       prs_struct *data = &p->in_data.data;
-       prs_struct *rdata = &p->out_data.rdata;
-
-       ZERO_STRUCT(q_u);
-       ZERO_STRUCT(r_u);
-
-       if(!spoolss_io_q_resetprinter("", &q_u, data, 0)) {
-               DEBUG(0,("spoolss_io_q_setprinterdata: unable to unmarshall SPOOL_Q_SETPRINTERDATA.\n"));
-               return False;
-       }
-       
-       r_u.status = _spoolss_resetprinter(p, &q_u, &r_u);
-
-       if(!spoolss_io_r_resetprinter("", &r_u, rdata, 0)) {
-               DEBUG(0,("spoolss_io_r_setprinterdata: unable to marshall SPOOL_R_RESETPRINTER.\n"));
-               return False;
-       }
-
-       return True;
+       return proxy_spoolss_call(p, NDR_SPOOLSS_RESETPRINTER);
 }
 
 /****************************************************************************
index 249e324c44a8cdf3047ff3232dccb9d6de508d47..8faa1f5355d71639301c9050463cf3e8175bec50 100644 (file)
@@ -8427,16 +8427,18 @@ done:
        return status;
 }
 
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_ResetPrinter
+****************************************************************/
 
-WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u)
+WERROR _spoolss_ResetPrinter(pipes_struct *p,
+                            struct spoolss_ResetPrinter *r)
 {
-       POLICY_HND      *handle = &q_u->handle;
+       POLICY_HND      *handle = r->in.handle;
        Printer_entry   *Printer=find_printer_index_by_hnd(p, handle);
        int             snum;
 
-       DEBUG(5,("_spoolss_resetprinter\n"));
+       DEBUG(5,("_spoolss_ResetPrinter\n"));
 
        /*
         * All we do is to check to see if the handle and queue is valid.
@@ -8445,7 +8447,8 @@ WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R
         */
 
        if (!Printer) {
-               DEBUG(2,("_spoolss_resetprinter: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+               DEBUG(2,("_spoolss_ResetPrinter: Invalid handle (%s:%u:%u).\n",
+                       OUR_HANDLE(handle)));
                return WERR_BADFID;
        }
 
@@ -10395,17 +10398,6 @@ WERROR _spoolss_EnumPrintProcDataTypes(pipes_struct *p,
        return WERR_NOT_SUPPORTED;
 }
 
-/****************************************************************
- _spoolss_ResetPrinter
-****************************************************************/
-
-WERROR _spoolss_ResetPrinter(pipes_struct *p,
-                            struct spoolss_ResetPrinter *r)
-{
-       p->rng_fault_state = true;
-       return WERR_NOT_SUPPORTED;
-}
-
 /****************************************************************
  _spoolss_GetPrinterDriver2
 ****************************************************************/