diff options
author | Tim Potter <tpot@samba.org> | 2002-01-31 11:42:16 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-01-31 11:42:16 +0000 |
commit | 1803778451a344c6c8d116eac5eaac777e5cf4fe (patch) | |
tree | f9c41436ac0f2fc3be65557ad9960ded4ea544fd | |
parent | f3f375dc6b7175d4dd4ce401815e5dfdd9747083 (diff) | |
download | samba-1803778451a344c6c8d116eac5eaac777e5cf4fe.tar.gz |
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.
-rw-r--r-- | source/rpc_parse/parse_spoolss.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index aa5981f7e9f..2ed436fd853 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/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; +} |