summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c32
2 files changed, 10 insertions, 44 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index cf5b4fb3f8..ac338a9bb9 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -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);
}
/****************************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index ec1a9a81da..2550adeb3a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -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;
}
/****************************************************************************
@@ -10171,17 +10168,6 @@ WERROR _spoolss_ReadPrinter(pipes_struct *p,
}
/****************************************************************
- _spoolss_AddJob
-****************************************************************/
-
-WERROR _spoolss_AddJob(pipes_struct *p,
- struct spoolss_AddJob *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_ScheduleJob
****************************************************************/