summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-15 00:53:08 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 21:40:21 +0100
commit3fe9b2fb4fc0d3b88d7e668c093feaf934ccbc5b (patch)
tree72d77ff7bf7cb1736f4e02eebbf429f796f938e7
parenteb542ef630ffa429746a5ec05a8592db85a0a99d (diff)
downloadsamba-3fe9b2fb4fc0d3b88d7e668c093feaf934ccbc5b.tar.gz
samba-3fe9b2fb4fc0d3b88d7e668c093feaf934ccbc5b.tar.bz2
samba-3fe9b2fb4fc0d3b88d7e668c093feaf934ccbc5b.zip
s3-spoolss: use pidl for _spoolss_AbortPrinter.
Guenther
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c23
2 files changed, 8 insertions, 37 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index fef6c49ba3..fa58bcd3f8 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -190,27 +190,7 @@ static bool api_spoolss_closeprinter(pipes_struct *p)
static bool api_spoolss_abortprinter(pipes_struct *p)
{
- SPOOL_Q_ABORTPRINTER q_u;
- SPOOL_R_ABORTPRINTER 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_abortprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_abortprinter: unable to unmarshall SPOOL_Q_ABORTPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_abortprinter(p, &q_u, &r_u);
-
- if (!spoolss_io_r_abortprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_abortprinter: unable to marshall SPOOL_R_ABORTPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ABORTPRINTER);
}
/********************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index d520ead802..9bfede824c 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5982,15 +5982,17 @@ static WERROR control_printer(POLICY_HND *handle, uint32 command,
return errcode;
}
-/********************************************************************
- * api_spoolss_abortprinter
+
+/****************************************************************
+ _spoolss_AbortPrinter
* From MSDN: "Deletes printer's spool file if printer is configured
* for spooling"
- ********************************************************************/
+****************************************************************/
-WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u)
+WERROR _spoolss_AbortPrinter(pipes_struct *p,
+ struct spoolss_AbortPrinter *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;
WERROR errcode = WERR_OK;
@@ -10144,17 +10146,6 @@ WERROR _spoolss_WritePrinter(pipes_struct *p,
}
/****************************************************************
- _spoolss_AbortPrinter
-****************************************************************/
-
-WERROR _spoolss_AbortPrinter(pipes_struct *p,
- struct spoolss_AbortPrinter *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_ReadPrinter
****************************************************************/