From edbed43119212c3642951516a1e6c065bd9db756 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Aug 2010 16:24:51 +0200 Subject: s3: Lift the server_messaging_context from notify_job_status --- source3/include/proto.h | 4 +++- source3/printing/notify.c | 8 ++++---- source3/printing/printing.c | 15 +++++++++++---- 3 files changed, 18 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 64ff1c9c25..e2fcdceef3 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4421,7 +4421,9 @@ void notify_job_status_byname(struct tevent_context *ev, const char *sharename, uint32 jobid, uint32 status, uint32 flags); -void notify_job_status(const char *sharename, uint32 jobid, uint32 status); +void notify_job_status(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *sharename, uint32 jobid, uint32 status); void notify_job_total_bytes(const char *sharename, uint32 jobid, uint32 size); void notify_job_total_pages(const char *sharename, uint32 jobid, diff --git a/source3/printing/notify.c b/source3/printing/notify.c index a1eabb5cfd..4b87a1980d 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -441,11 +441,11 @@ void notify_job_status_byname(struct tevent_context *ev, status, 0, flags); } -void notify_job_status(const char *sharename, uint32 jobid, uint32 status) +void notify_job_status(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *sharename, uint32 jobid, uint32 status) { - notify_job_status_byname(server_event_context(), - server_messaging_context(), - sharename, jobid, status, 0); + notify_job_status_byname(ev, msg_ctx, sharename, jobid, status, 0); } void notify_job_total_bytes(const char *sharename, uint32 jobid, diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 5d8348e705..a305e86bea 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -590,7 +590,10 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj notify_job_name(sharename, jobid, new_data->jobname); if (new_job || old_data->status != new_data->status) - notify_job_status(sharename, jobid, map_to_spoolss_status(new_data->status)); + notify_job_status(server_event_context(), + server_messaging_context(), + sharename, jobid, + map_to_spoolss_status(new_data->status)); if (new_job || old_data->size != new_data->size) notify_job_total_bytes(sharename, jobid, new_data->size); @@ -720,7 +723,9 @@ void pjob_delete(const char* sharename, uint32 jobid) properly. */ job_status = JOB_STATUS_DELETING|JOB_STATUS_DELETED; - notify_job_status(sharename, jobid, job_status); + notify_job_status(server_event_context(), + server_messaging_context(), + sharename, jobid, job_status); /* Remove from printing.tdb */ @@ -2229,7 +2234,8 @@ pause, or resume print job. User name: %s. Printer name: %s.", /* Send a printer notify message */ - notify_job_status(sharename, jobid, JOB_STATUS_PAUSED); + notify_job_status(server_event_context(), msg_ctx, sharename, jobid, + JOB_STATUS_PAUSED); /* how do we tell if this succeeded? */ @@ -2291,7 +2297,8 @@ pause, or resume print job. User name: %s. Printer name: %s.", /* Send a printer notify message */ - notify_job_status(sharename, jobid, JOB_STATUS_QUEUED); + notify_job_status(server_event_context(), msg_ctx, sharename, jobid, + JOB_STATUS_QUEUED); return True; } -- cgit