summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-14 23:36:11 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 18:55:46 +0100
commit46903a0f907869253899d05b3c04c93aa2e2812d (patch)
treec5ac583479c3f41de623bbde6fcdfec3677acab2 /source3
parenta45107abca61c2c7f097c807818bc11fc5910fd4 (diff)
downloadsamba-46903a0f907869253899d05b3c04c93aa2e2812d.tar.gz
samba-46903a0f907869253899d05b3c04c93aa2e2812d.tar.bz2
samba-46903a0f907869253899d05b3c04c93aa2e2812d.zip
s3-spoolss: use pidl for _spoolss_ClosePrinter.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c24
2 files changed, 8 insertions, 38 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index c34fd8f2a1..1f2534293a 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -179,27 +179,7 @@ static bool api_spoolss_deleteprinterdata(pipes_struct *p)
static bool api_spoolss_closeprinter(pipes_struct *p)
{
- SPOOL_Q_CLOSEPRINTER q_u;
- SPOOL_R_CLOSEPRINTER 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_closeprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_closeprinter: unable to unmarshall SPOOL_Q_CLOSEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_closeprinter(p, &q_u, &r_u);
-
- if (!spoolss_io_r_closeprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_closeprinter: unable to marshall SPOOL_R_CLOSEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_CLOSEPRINTER);
}
/********************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 9836e4ea72..e5e41065c2 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1913,13 +1913,14 @@ static WERROR _spoolss_enddocprinter_internal(pipes_struct *p, POLICY_HND *handl
return WERR_OK;
}
-/********************************************************************
- * api_spoolss_closeprinter
- ********************************************************************/
+/****************************************************************
+ _spoolss_ClosePrinter
+****************************************************************/
-WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u)
+WERROR _spoolss_ClosePrinter(pipes_struct *p,
+ struct spoolss_ClosePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
@@ -1934,7 +1935,7 @@ WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R
Previous code just copied the value of the closed
handle. --jerry */
- memset(&r_u->handle, '\0', sizeof(r_u->handle));
+ ZERO_STRUCTP(r->out.handle);
return WERR_OK;
}
@@ -10261,17 +10262,6 @@ WERROR _spoolss_WaitForPrinterChange(pipes_struct *p,
}
/****************************************************************
- _spoolss_ClosePrinter
-****************************************************************/
-
-WERROR _spoolss_ClosePrinter(pipes_struct *p,
- struct spoolss_ClosePrinter *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_AddForm
****************************************************************/