From 293136c04b7eb5293ef18273e13fca00c85bb5f0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Oct 2004 17:05:01 +0000 Subject: r3067: patch based on volker's initial work in trunk that fixes the queu update problem when using the background daemon (This used to be commit de7af09e727e744aa27af85ef7c0f73ed5c1550a) --- source3/printing/printfsp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/printing/printfsp.c') diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c index 0b6d4fdbe1..7c5de46870 100644 --- a/source3/printing/printfsp.c +++ b/source3/printing/printfsp.c @@ -53,16 +53,16 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname) } /* Convert to RAP id. */ - fsp->rap_print_jobid = pjobid_to_rap(SNUM(conn), jobid); + fsp->rap_print_jobid = pjobid_to_rap(lp_const_servicename(SNUM(conn)), jobid); if (fsp->rap_print_jobid == 0) { /* We need to delete the entry in the tdb. */ - pjob_delete(SNUM(conn), jobid); + pjob_delete(lp_const_servicename(SNUM(conn)), jobid); file_free(fsp); return NULL; } /* setup a full fsp */ - fsp->fd = print_job_fd(SNUM(conn),jobid); + fsp->fd = print_job_fd(lp_const_servicename(SNUM(conn)),jobid); GetTimeOfDay(&fsp->open_time); fsp->vuid = current_user.vuid; fsp->size = 0; @@ -77,7 +77,7 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname) fsp->sent_oplock_break = NO_BREAK_SENT; fsp->is_directory = False; fsp->directory_delete_on_close = False; - string_set(&fsp->fsp_name,print_job_fname(SNUM(conn),jobid)); + string_set(&fsp->fsp_name,print_job_fname(lp_const_servicename(SNUM(conn)),jobid)); fsp->wbmpx_ptr = NULL; fsp->wcp = NULL; SMB_VFS_FSTAT(fsp,fsp->fd, &sbuf); @@ -96,7 +96,7 @@ print a file - called on closing the file void print_fsp_end(files_struct *fsp, BOOL normal_close) { uint32 jobid; - int snum; + fstring sharename; if (fsp->share_mode == FILE_DELETE_ON_CLOSE) { /* @@ -110,7 +110,7 @@ void print_fsp_end(files_struct *fsp, BOOL normal_close) string_free(&fsp->fsp_name); } - if (!rap_to_pjobid(fsp->rap_print_jobid, &snum, &jobid)) { + if (!rap_to_pjobid(fsp->rap_print_jobid, sharename, &jobid)) { DEBUG(3,("print_fsp_end: Unable to convert RAP jobid %u to print jobid.\n", (unsigned int)fsp->rap_print_jobid )); return; -- cgit