s3: Lift the server_messaging_context from notify_job_total_bytes
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:26:40 +0000 (16:26 +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 e2fcdceef3aaf6cd6a8d89e3ef37a2b2626cd84e..ff842af90dc4d3e478c3c05836eeda54cd8c6bc0 100644 (file)
@@ -4424,7 +4424,9 @@ void notify_job_status_byname(struct tevent_context *ev,
 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,
+void notify_job_total_bytes(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           const char *sharename, uint32 jobid,
                            uint32 size);
 void notify_job_total_pages(const char *sharename, uint32 jobid,
                            uint32 pages);
index 4b87a1980dc8c26d0e0a561fad10f62b22e2f5cb..c8cdc4ec782a9b2e1eed5179fbb8c8b3e37b0517 100644 (file)
@@ -448,13 +448,14 @@ void notify_job_status(struct tevent_context *ev,
        notify_job_status_byname(ev, msg_ctx, sharename, jobid, status, 0);
 }
 
-void notify_job_total_bytes(const char *sharename, uint32 jobid,
+void notify_job_total_bytes(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           const char *sharename, uint32 jobid,
                            uint32 size)
 {
        /* 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_TOTAL_BYTES, jobid,
                                 size, 0, 0);
index a305e86bea68d68b3effccaa45fa102945a2378d..b35c868469bfefb2e14e7d620943cb44cb729044 100644 (file)
@@ -596,7 +596,9 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj
                                  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);
+               notify_job_total_bytes(server_event_context(),
+                                      server_messaging_context(),
+                                      sharename, jobid, new_data->size);
 
        if (new_job || old_data->page_count != new_data->page_count)
                notify_job_total_pages(sharename, jobid, new_data->page_count);