summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 16:24:51 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 18:09:35 +0200
commitedbed43119212c3642951516a1e6c065bd9db756 (patch)
treef3b90778a2d793ffa0f848380e9a1e1d1cbee625 /source3
parent9b3a53a7a7f6b055bfa074fe6d3fcaa6d6ccc9ce (diff)
downloadsamba-edbed43119212c3642951516a1e6c065bd9db756.tar.gz
samba-edbed43119212c3642951516a1e6c065bd9db756.tar.bz2
samba-edbed43119212c3642951516a1e6c065bd9db756.zip
s3: Lift the server_messaging_context from notify_job_status
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/printing/notify.c8
-rw-r--r--source3/printing/printing.c15
3 files changed, 18 insertions, 9 deletions
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;
}