s3: Lift the server_messaging_context from notify_job_status_byname
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:21:42 +0000 (16:21 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 16:09:35 +0000 (18:09 +0200)
source3/include/proto.h
source3/printing/notify.c
source3/utils/smbcontrol.c

index 2b26b10deb72a0e76175f96da281475089e4714a..64ff1c9c2534baddc02ac9c4ef1b80aa9afd4fa5 100644 (file)
@@ -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,
index de6515aa5c7195b4808b9b940c5ce9a33d6868a7..a1eabb5cfd81f90519df5179c438f91fc29c96e7 100644 (file)
@@ -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,
index 098e07616ba385af9661eedce6ff772d77527cad..db0b91eb48b009d8316e47a14ae4b321bb0c05f9 100644 (file)
@@ -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);