summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-09 22:12:15 +0100
committerGünther Deschner <gd@samba.org>2009-02-09 22:47:57 +0100
commitcb1ada9cc0ea3af889d874a2f3092560b0cec928 (patch)
treed8b1aea3b84e31ac7615e60bfc2333a02f794e57 /source3
parentf94b8ef9c05057fd51d859721128007480ccc9f4 (diff)
downloadsamba-cb1ada9cc0ea3af889d874a2f3092560b0cec928.tar.gz
samba-cb1ada9cc0ea3af889d874a2f3092560b0cec928.tar.bz2
samba-cb1ada9cc0ea3af889d874a2f3092560b0cec928.zip
s3-spoolss: use pidl for _spoolss_AddJob.
Guenther
Diffstat (limited to 'source3')
-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
****************************************************************/