summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-08 00:04:27 +0100
committerGünther Deschner <gd@samba.org>2009-02-09 10:42:12 +0100
commit3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0 (patch)
treea2b0e52f3eb34e0d4b1beea520b260bcef6c0721 /source3/rpc_server
parent5234f5e433847e6efd29e0c4a7d76a491818a92a (diff)
downloadsamba-3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0.tar.gz
samba-3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0.tar.bz2
samba-3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0.zip
s3-spoolss: use pidl for spoolss_AddForm.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c30
2 files changed, 12 insertions, 40 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index dd8bf0d4dd..fa2bea5a66 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -927,27 +927,7 @@ static bool api_spoolss_reset_printer(pipes_struct *p)
****************************************************************************/
static bool api_spoolss_addform(pipes_struct *p)
{
- SPOOL_Q_ADDFORM q_u;
- SPOOL_R_ADDFORM 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_addform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_addform: unable to unmarshall SPOOL_Q_ADDFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_addform(p, &q_u, &r_u);
-
- if(!spoolss_io_r_addform("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_addform: unable to marshall SPOOL_R_ADDFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ADDFORM);
}
/****************************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index fd1babe9f2..575c4c84f4 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -8452,13 +8452,15 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
return status;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_AddForm
+****************************************************************/
-WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u)
+WERROR _spoolss_AddForm(pipes_struct *p,
+ struct spoolss_AddForm *r)
{
- POLICY_HND *handle = &q_u->handle;
- FORM *form = &q_u->form;
+ POLICY_HND *handle = r->in.handle;
+ struct spoolss_AddFormInfo1 *form = r->in.info.info1;
nt_forms_struct tmpForm;
int snum;
WERROR status = WERR_OK;
@@ -8468,10 +8470,11 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
nt_forms_struct *list=NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
- DEBUG(5,("spoolss_addform\n"));
+ DEBUG(5,("_spoolss_AddForm\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_addform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_AddForm: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8496,7 +8499,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
/* can't add if builtin */
- if (get_a_builtin_ntform(&form->name,&tmpForm)) {
+ if (get_a_builtin_ntform_by_string(form->form_name, &tmpForm)) {
status = WERR_FILE_EXISTS;
goto done;
}
@@ -10209,17 +10212,6 @@ WERROR _spoolss_WaitForPrinterChange(pipes_struct *p,
}
/****************************************************************
- _spoolss_AddForm
-****************************************************************/
-
-WERROR _spoolss_AddForm(pipes_struct *p,
- struct spoolss_AddForm *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_GetForm
****************************************************************/