summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-01-31 11:42:16 +0000
committerTim Potter <tpot@samba.org>2002-01-31 11:42:16 +0000
commita630f289f54954426b3ee4d8b5faae51632233f4 (patch)
treec3f67593e8ff59061825a44fd96bbad9f1dfc016 /source3
parentf3ee505fcef3baccd508281f81e6ba9b20b83be3 (diff)
downloadsamba-a630f289f54954426b3ee4d8b5faae51632233f4.tar.gz
samba-a630f289f54954426b3ee4d8b5faae51632233f4.tar.bz2
samba-a630f289f54954426b3ee4d8b5faae51632233f4.zip
Added make functions for SPOOL_Q_{ADD,SET,DELETE}FORM.
I'm pretty sure that the useless_ptr in spoolss_io_q_setform() needs to be initialised to 1 otherwise the form isn't marshalled at all. JF, can you verify this? If so then this probably applies to the io functions for setform and deleteform. (This used to be commit 1803778451a344c6c8d116eac5eaac777e5cf4fe)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_spoolss.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index aa5981f7e9..2ed436fd85 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -5832,7 +5832,7 @@ BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps
BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
{
- uint32 useless_ptr=0;
+ uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_addform");
depth++;
@@ -6674,3 +6674,44 @@ BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCE
return True;
}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
+ int level, FORM *form)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ q_u->level = level;
+ q_u->level2 = level;
+ memcpy(&q_u->form, form, sizeof(FORM));
+
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
+ int level, FORM *form)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ q_u->level = level;
+ q_u->level2 = level;
+ memcpy(&q_u->form, form, sizeof(FORM));
+
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ init_unistr2(&q_u->name, form, strlen(form) + 1);
+ return True;
+}