mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3-spoolss: use pidl for _spoolss_RemoteFindFirstPrinterChangeNotifyEx.
Guenther
This commit is contained in:
parent
b3f6d69108
commit
c1e76d0dd9
@ -161,27 +161,7 @@ static bool api_spoolss_deleteprinterdriver(pipes_struct *p)
|
||||
|
||||
static bool api_spoolss_rffpcnex(pipes_struct *p)
|
||||
{
|
||||
SPOOL_Q_RFFPCNEX q_u;
|
||||
SPOOL_R_RFFPCNEX 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_rffpcnex("", &q_u, data, 0)) {
|
||||
DEBUG(0,("spoolss_io_q_rffpcnex: unable to unmarshall SPOOL_Q_RFFPCNEX.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
r_u.status = _spoolss_rffpcnex(p, &q_u, &r_u);
|
||||
|
||||
if (!spoolss_io_r_rffpcnex("", &r_u, rdata, 0)) {
|
||||
DEBUG(0,("spoolss_io_r_rffpcnex: unable to marshall SPOOL_R_RFFPCNEX.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
return proxy_spoolss_call(p, NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2893,26 +2893,22 @@ static struct spoolss_NotifyOption *dup_spoolss_NotifyOption(TALLOC_CTX *mem_ctx
|
||||
return option;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* _spoolss_rffpcnex
|
||||
* ReplyFindFirstPrinterChangeNotifyEx
|
||||
/****************************************************************
|
||||
* _spoolss_RemoteFindFirstPrinterChangeNotifyEx
|
||||
*
|
||||
* before replying OK: status=0 a rpc call is made to the workstation
|
||||
* asking ReplyOpenPrinter
|
||||
*
|
||||
* in fact ReplyOpenPrinter is the changenotify equivalent on the spoolss pipe
|
||||
* called from api_spoolss_rffpcnex
|
||||
********************************************************************/
|
||||
****************************************************************/
|
||||
|
||||
WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u)
|
||||
WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p,
|
||||
struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
|
||||
{
|
||||
POLICY_HND *handle = &q_u->handle;
|
||||
uint32 flags = q_u->flags;
|
||||
uint32 options = q_u->options;
|
||||
UNISTR2 *localmachine = &q_u->localmachine;
|
||||
uint32 printerlocal = q_u->printerlocal;
|
||||
POLICY_HND *handle = r->in.handle;
|
||||
int snum = -1;
|
||||
SPOOL_NOTIFY_OPTION *option = q_u->option;
|
||||
struct spoolss_NotifyOption *option = r->in.notify_options;
|
||||
struct sockaddr_storage client_ss;
|
||||
|
||||
/* store the notify value in the printer struct */
|
||||
@ -2920,19 +2916,19 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE
|
||||
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
|
||||
|
||||
if (!Printer) {
|
||||
DEBUG(2,("_spoolss_rffpcnex: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
|
||||
DEBUG(2,("_spoolss_RemoteFindFirstPrinterChangeNotifyEx: "
|
||||
"Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
|
||||
return WERR_BADFID;
|
||||
}
|
||||
|
||||
Printer->notify.flags=flags;
|
||||
Printer->notify.options=options;
|
||||
Printer->notify.printerlocal=printerlocal;
|
||||
Printer->notify.flags = r->in.flags;
|
||||
Printer->notify.options = r->in.options;
|
||||
Printer->notify.printerlocal = r->in.printer_local;
|
||||
|
||||
TALLOC_FREE(Printer->notify.option);
|
||||
Printer->notify.option = dup_spoolss_NotifyOption(Printer, option);
|
||||
|
||||
unistr2_to_ascii(Printer->notify.localmachine, localmachine,
|
||||
sizeof(Printer->notify.localmachine));
|
||||
fstrcpy(Printer->notify.localmachine, r->in.local_machine);
|
||||
|
||||
/* Connect to the client machine and send a ReplyOpenPrinter */
|
||||
|
||||
@ -10591,17 +10587,6 @@ WERROR _spoolss_ResetPrinterEx(pipes_struct *p,
|
||||
return WERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
_spoolss_RemoteFindFirstPrinterChangeNotifyEx
|
||||
****************************************************************/
|
||||
|
||||
WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p,
|
||||
struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
|
||||
{
|
||||
p->rng_fault_state = true;
|
||||
return WERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
_spoolss_RouterReplyPrinterEx
|
||||
****************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user