1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3-spoolss: use pidl for _spoolss_ClosePrinter.

Guenther
This commit is contained in:
Günther Deschner 2008-11-14 23:36:11 +01:00
parent a45107abca
commit 46903a0f90
2 changed files with 8 additions and 38 deletions

View File

@ -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);
}
/********************************************************************

View File

@ -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;
}
@ -10260,17 +10261,6 @@ WERROR _spoolss_WaitForPrinterChange(pipes_struct *p,
return WERR_NOT_SUPPORTED;
}
/****************************************************************
_spoolss_ClosePrinter
****************************************************************/
WERROR _spoolss_ClosePrinter(pipes_struct *p,
struct spoolss_ClosePrinter *r)
{
p->rng_fault_state = true;
return WERR_NOT_SUPPORTED;
}
/****************************************************************
_spoolss_AddForm
****************************************************************/