s3: Lift the server_messaging_context from notify_job_status
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:24:51 +0000 (16:24 +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/printing/printing.c

index 64ff1c9c2534baddc02ac9c4ef1b80aa9afd4fa5..e2fcdceef3aaf6cd6a8d89e3ef37a2b2626cd84e 100644 (file)
@@ -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,
index a1eabb5cfd81f90519df5179c438f91fc29c96e7..4b87a1980dc8c26d0e0a561fad10f62b22e2f5cb 100644 (file)
@@ -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,
index 5d8348e70541c8d295136c648d7612b7080c2438..a305e86bea68d68b3effccaa45fa102945a2378d 100644 (file)
@@ -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;
 }