s3-spoolss: use pidl for _spoolss_AddJob.
authorGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 21:12:15 +0000 (22:12 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 9 Feb 2009 21:47:57 +0000 (22:47 +0100)
Guenther

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

index cf5b4fb3f89ae2094a8cc80409c8815b0704a125..ac338a9bb9de3d7a3c925277f8b4cfaa78aba14e 100644 (file)
@@ -467,27 +467,7 @@ static bool api_spoolss_fcpn(pipes_struct *p)
 
 static bool api_spoolss_addjob(pipes_struct *p)
 {
-       SPOOL_Q_ADDJOB q_u;
-       SPOOL_R_ADDJOB 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_addjob("", &q_u, data, 0)) {
-               DEBUG(0,("spoolss_io_q_addjob: unable to unmarshall SPOOL_Q_ADDJOB.\n"));
-               return False;
-       }
-
-       r_u.status = _spoolss_addjob(p, &q_u, &r_u);
-               
-       if(!spoolss_io_r_addjob("",&r_u,rdata,0)) {
-               DEBUG(0,("spoolss_io_r_addjob: unable to marshall SPOOL_R_ADDJOB.\n"));
-               return False;
-       }
-
-       return True;            
+       return proxy_spoolss_call(p, NDR_SPOOLSS_ADDJOB);
 }
 
 /****************************************************************************
index ec1a9a81da9a2f78ff5d036fac031d0038564c31..2550adeb3ab68afb8b0bb9313502022bb172bfc6 100644 (file)
@@ -6611,24 +6611,21 @@ WERROR _spoolss_FindClosePrinterNotify(pipes_struct *p,
        return WERR_OK;
 }
 
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_AddJob
+****************************************************************/
 
-WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u)
+WERROR _spoolss_AddJob(pipes_struct *p,
+                      struct spoolss_AddJob *r)
 {
-       /* that's an [in out] buffer */
-
-       if (!q_u->buffer && (q_u->offered!=0)) {
+       if (!r->in.buffer && (r->in.offered != 0)) {
                return WERR_INVALID_PARAM;
        }
 
-       rpcbuf_move(q_u->buffer, &r_u->buffer);
+       /* this is what a NT server returns for AddJob. AddJob must fail on
+        * non-local printers */
 
-       r_u->needed = 0;
-       return WERR_INVALID_PARAM; /* this is what a NT server
-                                           returns for AddJob. AddJob
-                                           must fail on non-local
-                                           printers */
+       return WERR_INVALID_PARAM;
 }
 
 /****************************************************************************
@@ -10170,17 +10167,6 @@ WERROR _spoolss_ReadPrinter(pipes_struct *p,
        return WERR_NOT_SUPPORTED;
 }
 
-/****************************************************************
- _spoolss_AddJob
-****************************************************************/
-
-WERROR _spoolss_AddJob(pipes_struct *p,
-                      struct spoolss_AddJob *r)
-{
-       p->rng_fault_state = true;
-       return WERR_NOT_SUPPORTED;
-}
-
 /****************************************************************
  _spoolss_ScheduleJob
 ****************************************************************/