summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/printing.h3
-rw-r--r--source3/printing/printing.c5
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 35590a30d2..8cb12e0938 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -141,7 +141,8 @@ WERROR print_job_start(struct auth_serversupplied_info *server_info,
int snum, const char *docname, const char *filename,
struct spoolss_DeviceMode *devmode, uint32_t *_jobid);
void print_job_endpage(int snum, uint32 jobid);
-NTSTATUS print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
+NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
+ uint32 jobid, enum file_close_type close_type);
int print_queue_status(int snum,
print_queue_struct **ppqueue,
print_status_struct *status);
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 91ea09b28f..581783997b 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2749,7 +2749,8 @@ void print_job_endpage(int snum, uint32 jobid)
error.
****************************************************************************/
-NTSTATUS print_job_end(int snum, uint32 jobid, enum file_close_type close_type)
+NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
+ uint32 jobid, enum file_close_type close_type)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
@@ -2834,7 +2835,7 @@ NTSTATUS print_job_end(int snum, uint32 jobid, enum file_close_type close_type)
/* make sure the database is up to date */
if (print_cache_expired(lp_const_servicename(snum), True))
- print_queue_update(server_messaging_context(), snum, False);
+ print_queue_update(msg_ctx, snum, False);
return NT_STATUS_OK;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index aaa88f584d..b7fb70d6b8 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5290,7 +5290,7 @@ WERROR _spoolss_EndDocPrinter(struct pipes_struct *p,
}
Printer->document_started = false;
- status = print_job_end(snum, Printer->jobid, NORMAL_CLOSE);
+ status = print_job_end(p->msg_ctx, snum, Printer->jobid, NORMAL_CLOSE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(2, ("_spoolss_EndDocPrinter: "
"print_job_end failed [%s]\n",