diff options
author | Günther Deschner <gd@samba.org> | 2009-02-16 23:33:10 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-23 16:17:38 +0100 |
commit | c1e76d0dd9a1a7134fa3c0012a9cbe8f51f0716c (patch) | |
tree | cd3dc45792b4b066f7ee4161399169387822181c /source3/rpc_server/srv_spoolss_nt.c | |
parent | b3f6d6910850efaf6240dd01576d3794d8aec170 (diff) | |
download | samba-c1e76d0dd9a1a7134fa3c0012a9cbe8f51f0716c.tar.gz samba-c1e76d0dd9a1a7134fa3c0012a9cbe8f51f0716c.tar.bz2 samba-c1e76d0dd9a1a7134fa3c0012a9cbe8f51f0716c.zip |
s3-spoolss: use pidl for _spoolss_RemoteFindFirstPrinterChangeNotifyEx.
Guenther
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 41 |
1 files changed, 13 insertions, 28 deletions
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 ****************************************************************/ |