The branch, master has been updated
       via  73c603562fe22727d9fc313446e1d899038097f5 (commit)
       via  0d281b76a987442a91003eb3b6a2f659b4a1c61c (commit)
       via  43463fcc1eef6b0a674e0e5079341523e2406a5a (commit)
       via  cb1ada9cc0ea3af889d874a2f3092560b0cec928 (commit)
      from  f94b8ef9c05057fd51d859721128007480ccc9f4 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 73c603562fe22727d9fc313446e1d899038097f5
Author: Günther Deschner <[email protected]>
Date:   Mon Feb 9 22:30:54 2009 +0100

    s3-spoolss: remove old spoolss_ScheduleJob.
    
    Guenther

commit 0d281b76a987442a91003eb3b6a2f659b4a1c61c
Author: Günther Deschner <[email protected]>
Date:   Mon Feb 9 22:30:23 2009 +0100

    s3-spoolss: use pidl for _spoolss_ScheduleJob.
    
    Guenther

commit 43463fcc1eef6b0a674e0e5079341523e2406a5a
Author: Günther Deschner <[email protected]>
Date:   Mon Feb 9 22:12:38 2009 +0100

    s3-spoolss: remove old spoolss_AddJob.
    
    Guenther

commit cb1ada9cc0ea3af889d874a2f3092560b0cec928
Author: Günther Deschner <[email protected]>
Date:   Mon Feb 9 22:12:15 2009 +0100

    s3-spoolss: use pidl for _spoolss_AddJob.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/include/proto.h             |    6 --
 source3/include/rpc_spoolss.h       |   30 ------------
 source3/rpc_parse/parse_spoolss.c   |   90 -----------------------------------
 source3/rpc_server/srv_spoolss.c    |   44 +----------------
 source3/rpc_server/srv_spoolss_nt.c |   51 +++++--------------
 5 files changed, 16 insertions(+), 205 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7deaff3..e5dbe60 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5920,8 +5920,6 @@ bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, 
SPOOL_Q_SETPRINTER *q_u,
                                uint32 command);
 bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, 
prs_struct *ps, int depth);
 bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, 
prs_struct *ps, int depth);
-bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct 
*ps, int depth);
-bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct 
*ps, int depth);
 bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct 
*ps, int depth);
 bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
                                uint32 firstjob,
@@ -5930,8 +5928,6 @@ bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const 
POLICY_HND *hnd,
                                RPC_BUFFER *buffer,
                                uint32 offered);
 bool spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct 
*ps, int depth);
-bool spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, 
prs_struct *ps, int depth);
-bool spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, 
prs_struct *ps, int depth);
 bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct 
*ps, int depth);
 bool spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct 
*ps, int depth);
 bool spoolss_io_r_enumprinterdrivers(const char *desc, 
SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth);
@@ -6261,9 +6257,7 @@ WERROR _spoolss_startdocprinter(pipes_struct *p, 
SPOOL_Q_STARTDOCPRINTER *q_u, S
 WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char 
*portname, const char *uri );
 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, 
NT_PRINTER_INFO_LEVEL *printer);
 WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, 
SPOOL_R_SETPRINTER *r_u);
-WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB 
*r_u);
 WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, 
SPOOL_R_ENUMJOBS *r_u);
-WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, 
SPOOL_R_SCHEDULEJOB *r_u);
 WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB 
*r_u);
 WERROR _spoolss_enumprinterdrivers( pipes_struct *p, 
SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u);
 WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, 
SPOOL_R_ENUMFORMS *r_u);
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 15814d4..d0fac59 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -873,23 +873,6 @@ typedef struct add_jobinfo_1
 ADD_JOBINFO_1;
 
 
-typedef struct spool_q_addjob
-{
-       POLICY_HND handle;
-       uint32 level;
-       RPC_BUFFER *buffer;
-       uint32 offered;
-}
-SPOOL_Q_ADDJOB;
-
-typedef struct spool_r_addjob
-{
-       RPC_BUFFER *buffer;
-       uint32 needed;
-       WERROR status;
-}
-SPOOL_R_ADDJOB;
-
 /*
  * I'm really wondering how many different time formats
  * I will have to cope with
@@ -986,19 +969,6 @@ typedef struct spool_r_enumjobs
 }
 SPOOL_R_ENUMJOBS;
 
-typedef struct spool_q_schedulejob
-{
-       POLICY_HND handle;
-       uint32 jobid;
-}
-SPOOL_Q_SCHEDULEJOB;
-
-typedef struct spool_r_schedulejob
-{
-       WERROR status;
-}
-SPOOL_R_SCHEDULEJOB;
-
 typedef struct s_port_info_1
 {
        UNISTR port_name;
diff --git a/source3/rpc_parse/parse_spoolss.c 
b/source3/rpc_parse/parse_spoolss.c
index d0afb99..5876171 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -3449,60 +3449,6 @@ bool spoolss_io_q_setprinter(const char *desc, 
SPOOL_Q_SETPRINTER *q_u, prs_stru
 /*******************************************************************
 ********************************************************************/  
 
-bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct 
*ps, int depth)
-{              
-       prs_debug(ps, depth, desc, "");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       
-       if(!prs_rpcbuffer_p("", ps, depth, &r_u->buffer))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-       
-       if(!prs_uint32("needed", ps, depth, &r_u->needed))
-               return False;
-
-       if(!prs_werror("status", ps, depth, &r_u->status))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
-bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct 
*ps, int depth)
-{
-       prs_debug(ps, depth, desc, "");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
-               return False;
-       if(!prs_uint32("level", ps, depth, &q_u->level))
-               return False;
-       
-       if(!prs_rpcbuffer_p("", ps, depth, &q_u->buffer))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-       
-       if(!prs_uint32("offered", ps, depth, &q_u->offered))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
 bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct 
*ps, int depth)
 {              
        prs_debug(ps, depth, desc, "spoolss_io_r_enumjobs");
@@ -3588,42 +3534,6 @@ bool spoolss_io_q_enumjobs(const char *desc, 
SPOOL_Q_ENUMJOBS *q_u, prs_struct *
 /*******************************************************************
 ********************************************************************/  
 
-bool spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, 
prs_struct *ps, int depth)
-{              
-       prs_debug(ps, depth, desc, "spoolss_io_r_schedulejob");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       
-       if(!prs_werror("status", ps, depth, &r_u->status))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
-bool spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, 
prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "spoolss_io_q_schedulejob");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
-               return False;
-       if(!prs_uint32("jobid", ps, depth, &q_u->jobid))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/  
-
 bool spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct 
*ps, int depth)
 {              
        prs_debug(ps, depth, desc, "spoolss_io_r_setjob");
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index cf5b4fb..44551e3 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -467,27 +467,7 @@ static bool api_spoolss_fcpn(pipes_struct *p)
 
 static bool api_spoolss_addjob(pipes_struct *p)
 {
-       SPOOL_Q_ADDJOB q_u;
-       SPOOL_R_ADDJOB 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_addjob("", &q_u, data, 0)) {
-               DEBUG(0,("spoolss_io_q_addjob: unable to unmarshall 
SPOOL_Q_ADDJOB.\n"));
-               return False;
-       }
-
-       r_u.status = _spoolss_addjob(p, &q_u, &r_u);
-               
-       if(!spoolss_io_r_addjob("",&r_u,rdata,0)) {
-               DEBUG(0,("spoolss_io_r_addjob: unable to marshall 
SPOOL_R_ADDJOB.\n"));
-               return False;
-       }
-
-       return True;            
+       return proxy_spoolss_call(p, NDR_SPOOLSS_ADDJOB);
 }
 
 /****************************************************************************
@@ -523,27 +503,7 @@ static bool api_spoolss_enumjobs(pipes_struct *p)
 
 static bool api_spoolss_schedulejob(pipes_struct *p)
 {
-       SPOOL_Q_SCHEDULEJOB q_u;
-       SPOOL_R_SCHEDULEJOB 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_schedulejob("", &q_u, data, 0)) {
-               DEBUG(0,("spoolss_io_q_schedulejob: unable to unmarshall 
SPOOL_Q_SCHEDULEJOB.\n"));
-               return False;
-       }
-
-       r_u.status = _spoolss_schedulejob(p, &q_u, &r_u);
-
-       if(!spoolss_io_r_schedulejob("",&r_u,rdata,0)) {
-               DEBUG(0,("spoolss_io_r_schedulejob: unable to marshall 
SPOOL_R_SCHEDULEJOB.\n"));
-               return False;
-       }
-
-       return True;
+       return proxy_spoolss_call(p, NDR_SPOOLSS_SCHEDULEJOB);
 }
 
 /****************************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index ec1a9a8..bbbf414 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6611,24 +6611,21 @@ WERROR _spoolss_FindClosePrinterNotify(pipes_struct *p,
        return WERR_OK;
 }
 
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_AddJob
+****************************************************************/
 
-WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB 
*r_u)
+WERROR _spoolss_AddJob(pipes_struct *p,
+                      struct spoolss_AddJob *r)
 {
-       /* that's an [in out] buffer */
-
-       if (!q_u->buffer && (q_u->offered!=0)) {
+       if (!r->in.buffer && (r->in.offered != 0)) {
                return WERR_INVALID_PARAM;
        }
 
-       rpcbuf_move(q_u->buffer, &r_u->buffer);
+       /* this is what a NT server returns for AddJob. AddJob must fail on
+        * non-local printers */
 
-       r_u->needed = 0;
-       return WERR_INVALID_PARAM; /* this is what a NT server
-                                           returns for AddJob. AddJob
-                                           must fail on non-local
-                                           printers */
+       return WERR_INVALID_PARAM;
 }
 
 /****************************************************************************
@@ -6875,10 +6872,12 @@ WERROR _spoolss_enumjobs( pipes_struct *p, 
SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJO
        return wret;
 }
 
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_ScheduleJob
+****************************************************************/
 
-WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, 
SPOOL_R_SCHEDULEJOB *r_u)
+WERROR _spoolss_ScheduleJob(pipes_struct *p,
+                           struct spoolss_ScheduleJob *r)
 {
        return WERR_OK;
 }
@@ -10171,28 +10170,6 @@ WERROR _spoolss_ReadPrinter(pipes_struct *p,
 }
 
 /****************************************************************
- _spoolss_AddJob
-****************************************************************/
-
-WERROR _spoolss_AddJob(pipes_struct *p,
-                      struct spoolss_AddJob *r)
-{
-       p->rng_fault_state = true;
-       return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
- _spoolss_ScheduleJob
-****************************************************************/
-
-WERROR _spoolss_ScheduleJob(pipes_struct *p,
-                           struct spoolss_ScheduleJob *r)
-{
-       p->rng_fault_state = true;
-       return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
  _spoolss_GetPrinterData
 ****************************************************************/
 


-- 
Samba Shared Repository

Reply via email to