summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 17:15:23 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 18:09:37 +0200
commitd1f3a2efb7eef8372b7431cc5de3f8ab5d6ac981 (patch)
tree9469be33550e4e098b1e9b6b671ed3e7613d4ae1 /source3
parentae1600b99557e482fbb7aa04478b54b86976f6ae (diff)
downloadsamba-d1f3a2efb7eef8372b7431cc5de3f8ab5d6ac981.tar.gz
samba-d1f3a2efb7eef8372b7431cc5de3f8ab5d6ac981.tar.bz2
samba-d1f3a2efb7eef8372b7431cc5de3f8ab5d6ac981.zip
s3: Lift the server_messaging_context from print_job_write
Diffstat (limited to 'source3')
-rw-r--r--source3/include/printing.h5
-rw-r--r--source3/printing/printing.c8
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
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);