summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-09-05 20:56:09 +0000
committerJeremy Allison <jra@samba.org>2000-09-05 20:56:09 +0000
commitd644d4438cfef54733118cbd09f89518ffb318ca (patch)
treeb1512128d82728bb2ace5708fa7749a8800224c9 /source3/rpc_server/srv_spoolss.c
parenta3a28675fafbbc5a5a378b3a7235253d772ef63e (diff)
downloadsamba-d644d4438cfef54733118cbd09f89518ffb318ca.tar.gz
samba-d644d4438cfef54733118cbd09f89518ffb318ca.tar.bz2
samba-d644d4438cfef54733118cbd09f89518ffb318ca.zip
Implemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy. (This used to be commit 55ed0a9b0c91159c0fc4282c2171d9ced74a302a)
Diffstat (limited to 'source3/rpc_server/srv_spoolss.c')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 1e5ef1c673..fd6cf11746 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -775,6 +775,43 @@ static BOOL api_spoolss_enumprinterdrivers(pipes_struct *p)
/****************************************************************************
****************************************************************************/
+static BOOL api_spoolss_getform(pipes_struct *p)
+{
+ SPOOL_Q_GETFORM q_u;
+ SPOOL_R_GETFORM 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(!new_spoolss_allocate_buffer(&q_u.buffer))
+ return False;
+
+ if (!spoolss_io_q_getform("", &q_u, data, 0)) {
+ DEBUG(0,("spoolss_io_q_getform: unable to unmarshall SPOOL_Q_GETFORM.\n"));
+ return False;
+ }
+
+ /* that's an [in out] buffer */
+ new_spoolss_move_buffer(q_u.buffer, &r_u.buffer);
+
+ r_u.status = _spoolss_getform(&q_u.handle, q_u.level,
+ &q_u.formname, r_u.buffer, q_u.offered, &r_u.needed);
+
+ if (!new_spoolss_io_r_getform("",&r_u,rdata,0)) {
+ DEBUG(0,("new_spoolss_io_r_getform: unable to marshall SPOOL_R_GETFORM.\n"));
+ new_spoolss_free_buffer(q_u.buffer);
+ return False;
+ }
+
+ new_spoolss_free_buffer(q_u.buffer);
+
+ return True;
+}
+
+/****************************************************************************
+****************************************************************************/
static BOOL api_spoolss_enumforms(pipes_struct *p)
{
SPOOL_Q_ENUMFORMS q_u;
@@ -1293,6 +1330,7 @@ struct api_struct api_spoolss_cmds[] =
{"SPOOLSS_SETPRINTERDATA", SPOOLSS_SETPRINTERDATA, api_spoolss_setprinterdata },
{"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform },
{"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform },
+ {"SPOOLSS_GETFORM", SPOOLSS_GETFORM, api_spoolss_getform },
{"SPOOLSS_SETFORM", SPOOLSS_SETFORM, api_spoolss_setform },
{"SPOOLSS_ENUMPRINTPROCESSORS", SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_enumprintprocessors },
{"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors },