summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 16:21:42 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 18:09:35 +0200
commit9b3a53a7a7f6b055bfa074fe6d3fcaa6d6ccc9ce (patch)
treef49aa120f6f87679b638a625dfe63c16e60d7ab7
parent21811fe72df202413ca7f65bf271d4c9fe1345c5 (diff)
downloadsamba-9b3a53a7a7f6b055bfa074fe6d3fcaa6d6ccc9ce.tar.gz
samba-9b3a53a7a7f6b055bfa074fe6d3fcaa6d6ccc9ce.tar.bz2
samba-9b3a53a7a7f6b055bfa074fe6d3fcaa6d6ccc9ce.zip
s3: Lift the server_messaging_context from notify_job_status_byname
-rw-r--r--source3/include/proto.h5
-rw-r--r--source3/printing/notify.c12
-rw-r--r--source3/utils/smbcontrol.c4
3 files changed, 16 insertions, 5 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2b26b10deb..64ff1c9c25 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4416,7 +4416,10 @@ void notify_printer_status_byname(struct tevent_context *ev,
void notify_printer_status(struct tevent_context *ev,
struct messaging_context *msg_ctx,
int snum, uint32 status);
-void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
+void notify_job_status_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ uint32 status,
uint32 flags);
void notify_job_status(const char *sharename, uint32 jobid, uint32 status);
void notify_job_total_bytes(const char *sharename, uint32 jobid,
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index de6515aa5c..a1eabb5cfd 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -427,13 +427,15 @@ void notify_printer_status(struct tevent_context *ev,
notify_printer_status_byname(ev, msg_ctx, sharename, status);
}
-void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
+void notify_job_status_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ uint32 status,
uint32 flags)
{
/* Job id stored in id field, status in value1 */
- send_notify_field_values(server_event_context(),
- server_messaging_context(),
+ send_notify_field_values(ev, msg_ctx,
sharename, JOB_NOTIFY_TYPE,
JOB_NOTIFY_FIELD_STATUS, jobid,
status, 0, flags);
@@ -441,7 +443,9 @@ void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status
void notify_job_status(const char *sharename, uint32 jobid, uint32 status)
{
- notify_job_status_byname(sharename, jobid, status, 0);
+ notify_job_status_byname(server_event_context(),
+ server_messaging_context(),
+ sharename, jobid, status, 0);
}
void notify_job_total_bytes(const char *sharename, uint32 jobid,
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 098e07616b..db0b91eb48 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -625,6 +625,7 @@ static bool do_printnotify(struct messaging_context *msg_ctx,
jobid = atoi(argv[3]);
notify_job_status_byname(
+ messaging_event_context(msg_ctx), msg_ctx,
argv[2], jobid, JOB_STATUS_PAUSED,
SPOOLSS_NOTIFY_MSG_UNIX_JOBID);
@@ -642,6 +643,7 @@ static bool do_printnotify(struct messaging_context *msg_ctx,
jobid = atoi(argv[3]);
notify_job_status_byname(
+ messaging_event_context(msg_ctx), msg_ctx,
argv[2], jobid, JOB_STATUS_QUEUED,
SPOOLSS_NOTIFY_MSG_UNIX_JOBID);
@@ -659,10 +661,12 @@ static bool do_printnotify(struct messaging_context *msg_ctx,
jobid = atoi(argv[3]);
notify_job_status_byname(
+ messaging_event_context(msg_ctx), msg_ctx,
argv[2], jobid, JOB_STATUS_DELETING,
SPOOLSS_NOTIFY_MSG_UNIX_JOBID);
notify_job_status_byname(
+ messaging_event_context(msg_ctx), msg_ctx,
argv[2], jobid, JOB_STATUS_DELETING|
JOB_STATUS_DELETED,
SPOOLSS_NOTIFY_MSG_UNIX_JOBID);