summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-14 23:43:30 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 21:30:39 +0100
commitf968057cd21c78122a6716de11bdb448f99e907d (patch)
tree736fa464d5f6fc179084c533acad4aa5717af4e4 /source3
parent126d44436765746dd74258a217d66e9885bc396d (diff)
downloadsamba-f968057cd21c78122a6716de11bdb448f99e907d.tar.gz
samba-f968057cd21c78122a6716de11bdb448f99e907d.tar.bz2
samba-f968057cd21c78122a6716de11bdb448f99e907d.zip
s3-spoolss: use pidl for _spoolss_DeletePrinter.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss.c23
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c25
2 files changed, 7 insertions, 41 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 24d4049ef8..c5fed8cb39 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -221,30 +221,9 @@ static bool api_spoolss_abortprinter(pipes_struct *p)
static bool api_spoolss_deleteprinter(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTER q_u;
- SPOOL_R_DELETEPRINTER 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_deleteprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinter: unable to unmarshall SPOOL_Q_DELETEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinter(p, &q_u, &r_u);
-
- if (!spoolss_io_r_deleteprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_deleteprinter: unable to marshall SPOOL_R_DELETEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTER);
}
-
/********************************************************************
* api_spoolss_deleteprinterdriver
*
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index e5e41065c2..85f5d4076f 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1940,22 +1940,20 @@ WERROR _spoolss_ClosePrinter(pipes_struct *p,
return WERR_OK;
}
-/********************************************************************
- * api_spoolss_deleteprinter
-
- ********************************************************************/
+/****************************************************************
+ _spoolss_DeletePrinter
+****************************************************************/
-WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u)
+WERROR _spoolss_DeletePrinter(pipes_struct *p,
+ struct spoolss_DeletePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
WERROR result;
if (Printer && Printer->document_started)
_spoolss_enddocprinter_internal(p, handle); /* print job was not closed */
- memcpy(&r_u->handle, &q_u->handle, sizeof(r_u->handle));
-
result = delete_printer_handle(p, handle);
update_c_setprinter(False);
@@ -10009,17 +10007,6 @@ WERROR _spoolss_AddPrinter(pipes_struct *p,
}
/****************************************************************
- _spoolss_DeletePrinter
-****************************************************************/
-
-WERROR _spoolss_DeletePrinter(pipes_struct *p,
- struct spoolss_DeletePrinter *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_SetPrinter
****************************************************************/