s3: Lift the server_messaging_context from notify_job_total_pages
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:28:03 +0000 (16:28 +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 ff842af90dc4d3e478c3c05836eeda54cd8c6bc0..ca52984eb867bd00b4a66e03e1f37e60dc10cd70 100644 (file)
@@ -4428,7 +4428,9 @@ 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,
+void notify_job_total_pages(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           const char *sharename, uint32 jobid,
                            uint32 pages);
 void notify_job_username(const char *sharename, uint32 jobid, char *name);
 void notify_job_name(const char *sharename, uint32 jobid, char *name);
index c8cdc4ec782a9b2e1eed5179fbb8c8b3e37b0517..17dceaec3a3befdff235c089c8d0ba7bf2731489 100644 (file)
@@ -461,13 +461,14 @@ void notify_job_total_bytes(struct tevent_context *ev,
                                 size, 0, 0);
 }
 
-void notify_job_total_pages(const char *sharename, uint32 jobid,
+void notify_job_total_pages(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           const char *sharename, uint32 jobid,
                            uint32 pages)
 {
        /* 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_PAGES, jobid,
                                 pages, 0, 0);
index b35c868469bfefb2e14e7d620943cb44cb729044..d84fc7699b73857b960d3c09fe08d56d5a60f92d 100644 (file)
@@ -601,7 +601,9 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj
                                       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);
+               notify_job_total_pages(server_event_context(),
+                                      server_messaging_context(),
+                                      sharename, jobid, new_data->page_count);
 }
 
 /****************************************************************************