diff options
-rw-r--r-- | source3/include/printing.h | 5 | ||||
-rw-r--r-- | source3/printing/printing.c | 8 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 3 |
3 files changed, 11 insertions, 5 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h index 66fdda6a59..f68e7b27f2 100644 --- a/source3/include/printing.h +++ b/source3/include/printing.h @@ -134,7 +134,10 @@ bool print_job_pause(struct auth_serversupplied_info *server_info, bool print_job_resume(struct auth_serversupplied_info *server_info, struct messaging_context *msg_ctx, int snum, uint32 jobid, WERROR *errcode); -ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size); +ssize_t print_job_write(struct tevent_context *ev, + struct messaging_context *msg_ctx, + int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, + size_t size); int print_queue_length(struct messaging_context *msg_ctx, int snum, print_status_struct *pstatus); WERROR print_job_start(struct auth_serversupplied_info *server_info, diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 0d5f7f97ad..0a14a3ad42 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -2348,7 +2348,10 @@ pause, or resume print job. User name: %s. Printer name: %s.", Write to a print file. ****************************************************************************/ -ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size) +ssize_t print_job_write(struct tevent_context *ev, + struct messaging_context *msg_ctx, + int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, + size_t size) { const char* sharename = lp_const_servicename(snum); ssize_t return_code; @@ -2371,8 +2374,7 @@ ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, if (return_code>0) { pjob->size += size; - pjob_store(server_event_context(), server_messaging_context(), - sharename, jobid, pjob); + pjob_store(ev, msg_ctx, sharename, jobid, pjob); } return return_code; } diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index dd283caf46..367ac5931e 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5325,7 +5325,8 @@ WERROR _spoolss_WritePrinter(struct pipes_struct *p, return WERR_BADFID; /* print_job_write takes care of checking for PJOB_SMBD_SPOOLING */ - buffer_written = print_job_write(snum, Printer->jobid, + buffer_written = print_job_write(server_event_context(),p->msg_ctx, + snum, Printer->jobid, (const char *)r->in.data.data, (SMB_OFF_T)-1, (size_t)r->in._data_size); |