1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3: Lift the server_messaging_context from print_job_write

This commit is contained in:
Volker Lendecke 2010-08-08 17:15:23 +02:00
parent ae1600b995
commit d1f3a2efb7
3 changed files with 11 additions and 5 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -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);