s3: Lift the server_messaging_context from notify_job_submitted
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:33:05 +0000 (16:33 +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 e1784ebdac6e2e0e2fd1882a8ae0af530a4fa50a..2efde2e82d56fc09b46e2fe9a8ad0f4cdecda3c2 100644 (file)
@@ -4438,7 +4438,9 @@ void notify_job_username(struct tevent_context *ev,
 void notify_job_name(struct tevent_context *ev,
                     struct messaging_context *msg_ctx,
                     const char *sharename, uint32 jobid, char *name);
-void notify_job_submitted(const char *sharename, uint32 jobid,
+void notify_job_submitted(struct tevent_context *ev,
+                         struct messaging_context *msg_ctx,
+                         const char *sharename, uint32 jobid,
                          time_t submitted);
 void notify_printer_driver(int snum, const char *driver_name);
 void notify_printer_comment(int snum, const char *comment);
index 97d59c5318d2a1ed23021db5ca4cdfd8b05ee118..5cac9d40d368f8a7ecbdef52095abf871baefc31 100644 (file)
@@ -494,11 +494,13 @@ void notify_job_name(struct tevent_context *ev,
                jobid, strlen(name) + 1, name);
 }
 
-void notify_job_submitted(const char *sharename, uint32 jobid,
+void notify_job_submitted(struct tevent_context *ev,
+                         struct messaging_context *msg_ctx,
+                         const char *sharename, uint32 jobid,
                          time_t submitted)
 {
        send_notify_field_buffer(
-               server_event_context(), server_messaging_context(),
+               ev, msg_ctx,
                sharename, JOB_NOTIFY_TYPE, JOB_NOTIFY_FIELD_SUBMITTED,
                jobid, sizeof(submitted), (char *)&submitted);
 }
index 093d3b741651b59711f3ed842a2bd8b46aeaec7a..22330256a16c92ea0c620a4a950de01abea20212 100644 (file)
@@ -576,7 +576,9 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj
           --jerry (i'll feel dirty for this) */
 
        if (new_job) {
-               notify_job_submitted(sharename, jobid, new_data->starttime);
+               notify_job_submitted(server_event_context(),
+                                    server_messaging_context(),
+                                    sharename, jobid, new_data->starttime);
                notify_job_username(server_event_context(),
                                    server_messaging_context(),
                                    sharename, jobid, new_data->user);