summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-12 14:18:28 +0100
committerGünther Deschner <gd@samba.org>2009-02-23 16:17:35 +0100
commit5116f50eb82c76bac40c558c00db17be6b56f161 (patch)
treec7f0d03ac29abc2a74b9cf7cafa8270c06bc48b3 /source3/rpc_server
parent6259fac904641cdc191d866e4cd9936cc68df45e (diff)
downloadsamba-5116f50eb82c76bac40c558c00db17be6b56f161.tar.gz
samba-5116f50eb82c76bac40c558c00db17be6b56f161.tar.bz2
samba-5116f50eb82c76bac40c558c00db17be6b56f161.zip
s3-spoolss: use pidl for _spoolss_RouterRefreshPrinterChangeNotify.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss.c27
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c44
2 files changed, 24 insertions, 47 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 7bb71ab89f..17dbad6988 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -198,30 +198,9 @@ static bool api_spoolss_rffpcnex(pipes_struct *p)
static bool api_spoolss_rfnpcnex(pipes_struct *p)
{
- SPOOL_Q_RFNPCNEX q_u;
- SPOOL_R_RFNPCNEX 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_rfnpcnex("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_rfnpcnex: unable to unmarshall SPOOL_Q_RFNPCNEX.\n"));
- return False;
- }
-
- r_u.status = _spoolss_rfnpcnex(p, &q_u, &r_u);
-
- if (!spoolss_io_r_rfnpcnex("", &r_u, rdata, 0)) {
- SAFE_FREE(r_u.info.data);
- DEBUG(0,("spoolss_io_r_rfnpcnex: unable to marshall SPOOL_R_RFNPCNEX.\n"));
- return False;
- }
-
- SAFE_FREE(r_u.info.data);
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY);
+ /* FIXME */
+// SAFE_FREE(r_u.info.data);
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index eb04cadf40..c351c2fa2b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3794,24 +3794,31 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, struct spool
return WERR_OK;
}
-/********************************************************************
- * spoolss_rfnpcnex
- ********************************************************************/
+/****************************************************************
+ _spoolss_RouterRefreshPrinterChangeNotify
+****************************************************************/
-WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u)
+WERROR _spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p,
+ struct spoolss_RouterRefreshPrinterChangeNotify *r)
{
- POLICY_HND *handle = &q_u->handle;
- SPOOL_NOTIFY_INFO *info = &r_u->info;
+ POLICY_HND *handle = r->in.handle;
+ struct spoolss_NotifyInfo *info;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
WERROR result = WERR_BADFID;
- /* we always have a NOTIFY_INFO struct */
- r_u->info_ptr=0x1;
+ /* we always have a spoolss_NotifyInfo struct */
+ info = talloc_zero(p->mem_ctx, struct spoolss_NotifyInfo);
+ if (!info) {
+ result = WERR_NOMEM;
+ goto done;
+ }
+
+ *r->out.info = info;
if (!Printer) {
- DEBUG(2,("_spoolss_rfnpcnex: Invalid handle (%s:%u:%u).\n",
- OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_RouterRefreshPrinterChangeNotify: "
+ "Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
goto done;
}
@@ -3830,8 +3837,10 @@ WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCN
Printer->notify.fnpcn = True;
if (Printer->notify.client_connected) {
- DEBUG(10,("_spoolss_rfnpcnex: Saving change value in request [%x]\n", q_u->change));
- Printer->notify.change = q_u->change;
+ DEBUG(10,("_spoolss_RouterRefreshPrinterChangeNotify: "
+ "Saving change value in request [%x]\n",
+ r->in.change_low));
+ Printer->notify.change = r->in.change_low;
}
/* just ignore the SPOOL_NOTIFY_OPTION */
@@ -10553,17 +10562,6 @@ WERROR _spoolss_RouterReplyPrinterEx(pipes_struct *p,
}
/****************************************************************
- _dcesrv_spoolss_RouterRefreshPrinterChangeNotify
-****************************************************************/
-
-WERROR _spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p,
- struct spoolss_RouterRefreshPrinterChangeNotify *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_44
****************************************************************/