From 06cf2ae6ea3c8ef5e092dc3b465461746f3d466b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Aug 2010 16:29:31 +0200 Subject: [PATCH] s3: Lift the server_messaging_context from notify_job_username --- source3/include/proto.h | 4 +++- source3/printing/notify.c | 6 ++++-- source3/printing/printing.c | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index ca52984eb86..2f6e81539d0 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4432,7 +4432,9 @@ void notify_job_total_pages(struct tevent_context *ev, struct messaging_context *msg_ctx, const char *sharename, uint32 jobid, uint32 pages); -void notify_job_username(const char *sharename, uint32 jobid, char *name); +void notify_job_username(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *sharename, uint32 jobid, char *name); void notify_job_name(const char *sharename, uint32 jobid, char *name); void notify_job_submitted(const char *sharename, uint32 jobid, time_t submitted); diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 17dceaec3a3..de073f42ecc 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -474,10 +474,12 @@ void notify_job_total_pages(struct tevent_context *ev, pages, 0, 0); } -void notify_job_username(const char *sharename, uint32 jobid, char *name) +void notify_job_username(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *sharename, uint32 jobid, char *name) { send_notify_field_buffer( - server_event_context(), server_messaging_context(), + ev, msg_ctx, sharename, JOB_NOTIFY_TYPE, JOB_NOTIFY_FIELD_USER_NAME, jobid, strlen(name) + 1, name); } diff --git a/source3/printing/printing.c b/source3/printing/printing.c index d84fc7699b7..fe42f55d1e2 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -577,7 +577,9 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj if (new_job) { notify_job_submitted(sharename, jobid, new_data->starttime); - notify_job_username(sharename, jobid, new_data->user); + notify_job_username(server_event_context(), + server_messaging_context(), + sharename, jobid, new_data->user); } if (new_job || !strequal(old_data->jobname, new_data->jobname)) -- 2.11.4.GIT