summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c41
2 files changed, 14 insertions, 49 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index cfe3c994e5..ee36f04c6d 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -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);
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 97ce109e7f..a4679eb717 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -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 */
@@ -10592,17 +10588,6 @@ WERROR _spoolss_ResetPrinterEx(pipes_struct *p,
}
/****************************************************************
- _spoolss_RemoteFindFirstPrinterChangeNotifyEx
-****************************************************************/
-
-WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p,
- struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_RouterReplyPrinterEx
****************************************************************/