summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-28 02:03:02 +0000
committerJeremy Allison <jra@samba.org>2001-02-28 02:03:02 +0000
commit2a258f7a64873fe4be213f974e21e6f0f596d0cd (patch)
tree5de8dcdeca5631bb4ff51764ec6edddd48a14c25 /source3/rpc_server
parent6ed9b52862fa076c26a267ab48df5a097f17edd6 (diff)
downloadsamba-2a258f7a64873fe4be213f974e21e6f0f596d0cd.tar.gz
samba-2a258f7a64873fe4be213f974e21e6f0f596d0cd.tar.bz2
samba-2a258f7a64873fe4be213f974e21e6f0f596d0cd.zip
Converted more to canonical format... save as I go.,
Jeremy. (This used to be commit 1d4ff7a81bccce0e5701102314af4f9c64c55cd6)
Diffstat (limited to 'source3/rpc_server')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c24
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c42
2 files changed, 40 insertions, 26 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 4bd70ca755..d8eaab2714 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -340,12 +340,12 @@ static BOOL api_spoolss_getprinter(pipes_struct *p)
return True;
}
-
/********************************************************************
* api_spoolss_getprinter
* called from the spoolss dispatcher
*
********************************************************************/
+
static BOOL api_spoolss_getprinterdriver2(pipes_struct *p)
{
SPOOL_Q_GETPRINTERDRIVER2 q_u;
@@ -361,13 +361,7 @@ static BOOL api_spoolss_getprinterdriver2(pipes_struct *p)
return False;
}
- /* that's an [in out] buffer */
- new_spoolss_move_buffer(q_u.buffer, &r_u.buffer);
-
- r_u.status = _spoolss_getprinterdriver2(&q_u.handle, &q_u.architecture, q_u.level,
- q_u.clientmajorversion, q_u.clientminorversion,
- r_u.buffer, q_u.offered,
- &r_u.needed, &r_u.servermajorversion, &r_u.serverminorversion);
+ r_u.status = _spoolss_getprinterdriver2(p, &q_u, &r_u);
if(!spoolss_io_r_getprinterdriver2("",&r_u,rdata,0)) {
DEBUG(0,("spoolss_io_r_getprinterdriver2: unable to marshall SPOOL_R_GETPRINTERDRIVER2.\n"));
@@ -382,6 +376,7 @@ static BOOL api_spoolss_getprinterdriver2(pipes_struct *p)
* called from the spoolss dispatcher
*
********************************************************************/
+
static BOOL api_spoolss_startpageprinter(pipes_struct *p)
{
SPOOL_Q_STARTPAGEPRINTER q_u;
@@ -397,7 +392,7 @@ static BOOL api_spoolss_startpageprinter(pipes_struct *p)
return False;
}
- r_u.status = _spoolss_startpageprinter(&q_u.handle);
+ r_u.status = _spoolss_startpageprinter(p, &q_u, &r_u);
if(!spoolss_io_r_startpageprinter("",&r_u,rdata,0)) {
DEBUG(0,("spoolss_io_r_startpageprinter: unable to marshall SPOOL_R_STARTPAGEPRINTER.\n"));
@@ -407,12 +402,12 @@ static BOOL api_spoolss_startpageprinter(pipes_struct *p)
return True;
}
-
/********************************************************************
* api_spoolss_getprinter
* called from the spoolss dispatcher
*
********************************************************************/
+
static BOOL api_spoolss_endpageprinter(pipes_struct *p)
{
SPOOL_Q_ENDPAGEPRINTER q_u;
@@ -428,7 +423,7 @@ static BOOL api_spoolss_endpageprinter(pipes_struct *p)
return False;
}
- r_u.status = _spoolss_endpageprinter(&q_u.handle);
+ r_u.status = _spoolss_endpageprinter(p, &q_u, &r_u);
if(!spoolss_io_r_endpageprinter("",&r_u,rdata,0)) {
DEBUG(0,("spoolss_io_r_endpageprinter: unable to marshall SPOOL_R_ENDPAGEPRINTER.\n"));
@@ -440,6 +435,7 @@ static BOOL api_spoolss_endpageprinter(pipes_struct *p)
/********************************************************************
********************************************************************/
+
static BOOL api_spoolss_startdocprinter(pipes_struct *p)
{
SPOOL_Q_STARTDOCPRINTER q_u;
@@ -455,10 +451,7 @@ static BOOL api_spoolss_startdocprinter(pipes_struct *p)
return False;
}
- r_u.status = _spoolss_startdocprinter(&q_u.handle,
- q_u.doc_info_container.level, p,
- &q_u.doc_info_container.docinfo,
- &r_u.jobid);
+ r_u.status = _spoolss_startdocprinter(p, &q_u, &r_u);
if(!spoolss_io_r_startdocprinter("",&r_u,rdata,0)) {
DEBUG(0,("spoolss_io_r_startdocprinter: unable to marshall SPOOL_R_STARTDOCPRINTER.\n"));
@@ -468,7 +461,6 @@ static BOOL api_spoolss_startdocprinter(pipes_struct *p)
return True;
}
-
/********************************************************************
********************************************************************/
static BOOL api_spoolss_enddocprinter(pipes_struct *p)
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 0e09bff289..4b5d27d002 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3739,15 +3739,28 @@ static uint32 getprinterdriver2_level6(fstring servername, fstring architecture,
/****************************************************************************
****************************************************************************/
-uint32 _spoolss_getprinterdriver2(POLICY_HND *handle, const UNISTR2 *uni_arch, uint32 level,
- uint32 clientmajorversion, uint32 clientminorversion,
- NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed, uint32 *servermajorversion, uint32 *serverminorversion)
+
+uint32 _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u)
{
+ POLICY_HND *handle = &q_u->handle;
+ UNISTR2 *uni_arch = &q_u->architecture;
+ uint32 level = q_u->level;
+ uint32 clientmajorversion = q_u->clientmajorversion;
+/* uint32 clientminorversion = q_u->clientminorversion; - notused. */
+ NEW_BUFFER *buffer = NULL;
+ uint32 offered = q_u->offered;
+ uint32 *needed = &r_u->needed;
+ uint32 *servermajorversion = &r_u->servermajorversion;
+ uint32 *serverminorversion = &r_u->serverminorversion;
+
fstring servername;
fstring architecture;
int snum;
+ /* that's an [in out] buffer */
+ new_spoolss_move_buffer(q_u->buffer, &r_u->buffer);
+ buffer = r_u->buffer;
+
DEBUG(4,("_spoolss_getprinterdriver2\n"));
*needed=0;
@@ -3776,8 +3789,11 @@ uint32 _spoolss_getprinterdriver2(POLICY_HND *handle, const UNISTR2 *uni_arch, u
/****************************************************************************
****************************************************************************/
-uint32 _spoolss_startpageprinter(POLICY_HND *handle)
+
+uint32 _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u)
{
+ POLICY_HND *handle = &q_u->handle;
+
Printer_entry *Printer = find_printer_index_by_hnd(handle);
if (OPEN_HANDLE(Printer)) {
@@ -3791,8 +3807,11 @@ uint32 _spoolss_startpageprinter(POLICY_HND *handle)
/****************************************************************************
****************************************************************************/
-uint32 _spoolss_endpageprinter(POLICY_HND *handle)
+
+uint32 _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u)
{
+ POLICY_HND *handle = &q_u->handle;
+
Printer_entry *Printer = find_printer_index_by_hnd(handle);
if (!OPEN_HANDLE(Printer)) {
@@ -3805,16 +3824,19 @@ uint32 _spoolss_endpageprinter(POLICY_HND *handle)
return NT_STATUS_NO_PROBLEMO;
}
-
/********************************************************************
* api_spoolss_getprinter
* called from the spoolss dispatcher
*
********************************************************************/
-uint32 _spoolss_startdocprinter(POLICY_HND *handle, uint32 level,
- pipes_struct *p, DOC_INFO *docinfo,
- uint32 *jobid)
+
+uint32 _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u)
{
+ POLICY_HND *handle = &q_u->handle;
+/* uint32 level = q_u->doc_info_container.level; - notused. */
+ DOC_INFO *docinfo = &q_u->doc_info_container.docinfo;
+ uint32 *jobid = &r_u->jobid;
+
DOC_INFO_1 *info_1 = &docinfo->doc_info_1;
int snum;
pstring jobname;