[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-680-g3b4bf2f

Günther Deschner gd at samba.org
Mon Feb 9 18:11:44 GMT 2009


The branch, master has been updated
       via  3b4bf2f8a9c5150d03ea083e6db7d15035697806 (commit)
       via  d2b8fb99eedcfa16e1f68d3ca99df08e4503a598 (commit)
      from  d87891ea3e1cf0c4e4d16ceb5b6b0a7c65cedf3f (commit)

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


- Log -----------------------------------------------------------------
commit 3b4bf2f8a9c5150d03ea083e6db7d15035697806
Author: Günther Deschner <gd at samba.org>
Date:   Mon Feb 9 13:35:05 2009 +0100

    s3-spoolss: remove old spoolss_ReplyClosePrinter.
    
    Guenther

commit d2b8fb99eedcfa16e1f68d3ca99df08e4503a598
Author: Günther Deschner <gd at samba.org>
Date:   Mon Feb 9 13:34:35 2009 +0100

    s3-spoolss: use rpccli_spoolss_ReplyClosePrinter.
    
    Guenther

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

Summary of changes:
 source3/include/proto.h                 |    5 ---
 source3/include/rpc_spoolss.h           |   13 -------
 source3/rpc_client/cli_spoolss_notify.c |   29 -----------------
 source3/rpc_parse/parse_spoolss.c       |   53 -------------------------------
 source3/rpc_server/srv_spoolss_nt.c     |   10 +++---
 5 files changed, 5 insertions(+), 105 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 670fb49..530361f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5507,8 +5507,6 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *me
 WERROR rpccli_spoolss_reply_open_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
 				      const char *printer, uint32 printerlocal, uint32 type, 
 				      POLICY_HND *handle);
-WERROR rpccli_spoolss_reply_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
-				       POLICY_HND *handle);
 WERROR rpccli_spoolss_routerreplyprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 				      POLICY_HND *pol, uint32 condition, uint32 change_id);
 WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
@@ -6025,9 +6023,6 @@ bool make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_H
 					uint32 condition, uint32 change_id);
 bool spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth);
 bool spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth);
-bool make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd);
-bool spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth);
 bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
 			        uint32 change_low, uint32 change_high,
 				SPOOL_NOTIFY_INFO *info);
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index b159263..9fa60db 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -1618,19 +1618,6 @@ typedef struct spool_r_routerreplyprinter
 }
 SPOOL_R_ROUTERREPLYPRINTER;
 
-typedef struct spool_q_replycloseprinter
-{
-	POLICY_HND handle;
-}
-SPOOL_Q_REPLYCLOSEPRINTER;
-
-typedef struct spool_r_replycloseprinter
-{
-	POLICY_HND handle;
-	WERROR status;
-}
-SPOOL_R_REPLYCLOSEPRINTER;
-
 typedef struct spool_q_rrpcn
 {
 	POLICY_HND handle;
diff --git a/source3/rpc_client/cli_spoolss_notify.c b/source3/rpc_client/cli_spoolss_notify.c
index 5440f76..8e528ee 100644
--- a/source3/rpc_client/cli_spoolss_notify.c
+++ b/source3/rpc_client/cli_spoolss_notify.c
@@ -65,35 +65,6 @@ WERROR rpccli_spoolss_reply_open_printer(struct rpc_pipe_client *cli, TALLOC_CTX
 	return result;
 }
 
-/* Close a back-channel notification connection */
-
-WERROR rpccli_spoolss_reply_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
-				       POLICY_HND *handle)
-{
-	prs_struct qbuf, rbuf;
-	SPOOL_Q_REPLYCLOSEPRINTER q;
-	SPOOL_R_REPLYCLOSEPRINTER r;
-	WERROR result = W_ERROR(ERRgeneral);
-
-	/* Initialise input parameters */
-
-	make_spoolss_q_reply_closeprinter(&q, handle);
-
-	/* Marshall data and send request */
-
-	CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_REPLYCLOSEPRINTER,
-		q, r,
-		qbuf, rbuf,
-		spoolss_io_q_replycloseprinter,
-		spoolss_io_r_replycloseprinter,
-		WERR_GENERAL_FAILURE );
-
-	/* Return result */
-
-	result = r.status;
-	return result;
-}
-
 /*********************************************************************
  This SPOOLSS_ROUTERREPLYPRINTER function is used to send a change 
  notification event when the registration **did not** use 
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index fbb001f..5558e2f 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -5643,59 +5643,6 @@ bool spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINT
 	return True;
 }
 
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd)
-{      
-	if (q_u == NULL)
-		return False;
-
-	memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
-
-	return True;
-}
-
-/*******************************************************************
- Parse a SPOOL_Q_REPLYCLOSEPRINTER structure.
-********************************************************************/  
-
-bool spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth)
-{
-	prs_debug(ps, depth, desc, "spoolss_io_q_replycloseprinter");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
- Parse a SPOOL_R_REPLYCLOSEPRINTER structure.
-********************************************************************/  
-
-bool spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth)
-{		
-	prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter");
-	depth++;
-
-	if (!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth))
-		return False;
-
-	if (!prs_werror("status", ps, depth, &r_u->status))
-		return False;
-
-	return True;		
-}
-
 #if 0	/* JERRY - not currently used but could be :-) */
 
 /*******************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 04bbc97..ec1a9a8 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -150,6 +150,7 @@ static void free_spool_notify_option(SPOOL_NOTIFY_OPTION **pp)
 static void srv_spoolss_replycloseprinter(int snum, POLICY_HND *handle)
 {
 	WERROR result;
+	NTSTATUS status;
 
 	/*
 	 * Tell the specific printing tdb we no longer want messages for this printer
@@ -165,11 +166,10 @@ static void srv_spoolss_replycloseprinter(int snum, POLICY_HND *handle)
 		return;
 	}
 
-	result = rpccli_spoolss_reply_close_printer(notify_cli_pipe,
-				talloc_tos(),
-				handle);
-
-	if (!W_ERROR_IS_OK(result))
+	status = rpccli_spoolss_ReplyClosePrinter(notify_cli_pipe, talloc_tos(),
+						  handle,
+						  &result);
+	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result))
 		DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n",
 			win_errstr(result)));
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list