[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Tue Apr 5 05:13:01 MDT 2011


The branch, master has been updated
       via  fe35ff2 s3: Make vlp printing work by default
       via  0f08e9d s3: Fix print_spool_end
      from  4b78956 s4 samba-tool: Implement "testparm" command

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


- Log -----------------------------------------------------------------
commit fe35ff2bf98c166b2f3bfbaa171a58727e1ba091
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 2 18:51:55 2011 +0200

    s3: Make vlp printing work by default
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Tue Apr  5 13:12:14 CEST 2011 on sn-devel-104

commit 0f08e9d92222b97cfea3fa5c9ac633790cc4f76d
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 2 18:46:58 2011 +0200

    s3: Fix print_spool_end
    
    We have to use the spoolss pipe instance opened in print_spool_open, otherwise
    the spoolss server won't be able to find the right printer and job.

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

Summary of changes:
 source3/param/loadparm.c        |   63 ++++++++++++++++++++++++++++++++++-----
 source3/printing/printspoolss.c |   12 -------
 2 files changed, 55 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 172e5c4..0f76f09 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4864,15 +4864,62 @@ static void init_printer_values(struct service *pService)
 #if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
 
 	case PRINT_TEST:
-	case PRINT_VLP:
-		string_set(&pService->szPrintcommand, "vlp print %p %s");
-		string_set(&pService->szLpqcommand, "vlp lpq %p");
-		string_set(&pService->szLprmcommand, "vlp lprm %p %j");
-		string_set(&pService->szLppausecommand, "vlp lppause %p %j");
-		string_set(&pService->szLpresumecommand, "vlp lpresume %p %j");
-		string_set(&pService->szQueuepausecommand, "vlp queuepause %p");
-		string_set(&pService->szQueueresumecommand, "vlp queueresume %p");
+	case PRINT_VLP: {
+		const char *tdbfile;
+		char *tmp;
+
+		tdbfile = talloc_asprintf(
+			talloc_tos(), "tdbfile=%s",
+			lp_parm_const_string(-1, "vlp", "tdbfile",
+					     "/tmp/vlp.tdb"));
+		if (tdbfile == NULL) {
+			tdbfile="tdbfile=/tmp/vlp.tdb";
+		}
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s print %%p %%s",
+				      tdbfile);
+		string_set(&pService->szPrintcommand,
+			   tmp ? tmp : "vlp print %p %s");
+		TALLOC_FREE(tmp);
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s lpq %%p",
+				      tdbfile);
+		string_set(&pService->szLpqcommand,
+			   tmp ? tmp : "vlp lpq %p");
+		TALLOC_FREE(tmp);
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s lprm %%p %%j",
+				      tdbfile);
+		string_set(&pService->szLprmcommand,
+			   tmp ? tmp : "vlp lprm %p %j");
+		TALLOC_FREE(tmp);
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s lppause %%p %%j",
+				      tdbfile);
+		string_set(&pService->szLppausecommand,
+			   tmp ? tmp : "vlp lppause %p %j");
+		TALLOC_FREE(tmp);
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s lpresume %%p %%j",
+				      tdbfile);
+		string_set(&pService->szLpresumecommand,
+			   tmp ? tmp : "vlp lpresume %p %j");
+		TALLOC_FREE(tmp);
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s queuepause %%p",
+				      tdbfile);
+		string_set(&pService->szQueuepausecommand,
+			   tmp ? tmp : "vlp queuepause %p");
+		TALLOC_FREE(tmp);
+
+		tmp = talloc_asprintf(talloc_tos(), "vlp %s queueresume %%p",
+				      tdbfile);
+		string_set(&pService->szQueueresumecommand,
+			   tmp ? tmp : "vlp queueresume %p");
+		TALLOC_FREE(tmp);
+
 		break;
+	}
 #endif /* DEVELOPER */
 
 	}
diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c
index 01137df..352fcb8 100644
--- a/source3/printing/printspoolss.c
+++ b/source3/printing/printspoolss.c
@@ -277,18 +277,6 @@ void print_spool_end(files_struct *fsp, enum file_close_type close_type)
 	WERROR werr;
 	struct dcerpc_binding_handle *b = NULL;
 
-	status = rpc_pipe_open_interface(fsp->conn,
-					 &ndr_table_spoolss.syntax_id,
-					 fsp->conn->session_info,
-					 &fsp->conn->sconn->client_id,
-					 fsp->conn->sconn->msg_ctx,
-					 &fsp->conn->spoolss_pipe);
-	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(0, ("print_spool_end: "
-			  "Failed to get spoolss pipe [%s]\n",
-			  nt_errstr(status)));
-		return;
-	}
 	b = fsp->conn->spoolss_pipe->binding_handle;
 
 	switch (close_type) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list