s3: Lift the server_messaging_context from notify_job_name
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:31:41 +0000 (16:31 +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 2f6e81539d00bd66de05a893d9d0aa08f634c30f..e1784ebdac6e2e0e2fd1882a8ae0af530a4fa50a 100644 (file)
@@ -4435,7 +4435,9 @@ void notify_job_total_pages(struct tevent_context *ev,
 void notify_job_username(struct tevent_context *ev,
                         struct messaging_context *msg_ctx,
                         const char *sharename, uint32 jobid, char *name);
-void notify_job_name(const char *sharename, uint32 jobid, char *name);
+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,
                          time_t submitted);
 void notify_printer_driver(int snum, const char *driver_name);
index de073f42ecc60aae809637a4e770669222247ad8..97d59c5318d2a1ed23021db5ca4cdfd8b05ee118 100644 (file)
@@ -484,10 +484,12 @@ void notify_job_username(struct tevent_context *ev,
                jobid, strlen(name) + 1, name);
 }
 
-void notify_job_name(const char *sharename, uint32 jobid, char *name)
+void notify_job_name(struct tevent_context *ev,
+                    struct messaging_context *msg_ctx,
+                    const char *sharename, uint32 jobid, char *name)
 {
        send_notify_field_buffer(
-               server_event_context(), server_messaging_context(),
+               ev, msg_ctx,
                sharename, JOB_NOTIFY_TYPE, JOB_NOTIFY_FIELD_DOCUMENT,
                jobid, strlen(name) + 1, name);
 }
index fe42f55d1e2081a88e53996260722619b462404f..093d3b741651b59711f3ed842a2bd8b46aeaec7a 100644 (file)
@@ -583,13 +583,17 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj
        }
 
        if (new_job || !strequal(old_data->jobname, new_data->jobname))
-               notify_job_name(sharename, jobid, new_data->jobname);
+               notify_job_name(server_event_context(),
+                               server_messaging_context(),
+                               sharename, jobid, new_data->jobname);
 
        /* Job attributes of a new job or attributes that can be
           modified. */
 
        if (new_job || !strequal(old_data->jobname, new_data->jobname))
-               notify_job_name(sharename, jobid, new_data->jobname);
+               notify_job_name(server_event_context(),
+                               server_messaging_context(),
+                               sharename, jobid, new_data->jobname);
 
        if (new_job || old_data->status != new_data->status)
                notify_job_status(server_event_context(),