s3: Lift the server_messaging_context from notify_job_username
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:29:31 +0000 (16:29 +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 ca52984eb867bd00b4a66e03e1f37e60dc10cd70..2f6e81539d00bd66de05a893d9d0aa08f634c30f 100644 (file)
@@ -4432,7 +4432,9 @@ 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_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_submitted(const char *sharename, uint32 jobid,
                          time_t submitted);
index 17dceaec3a3befdff235c089c8d0ba7bf2731489..de073f42ecc60aae809637a4e770669222247ad8 100644 (file)
@@ -474,10 +474,12 @@ void notify_job_total_pages(struct tevent_context *ev,
                                 pages, 0, 0);
 }
 
-void notify_job_username(const char *sharename, uint32 jobid, char *name)
+void notify_job_username(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_USER_NAME,
                jobid, strlen(name) + 1, name);
 }
index d84fc7699b73857b960d3c09fe08d56d5a60f92d..fe42f55d1e2081a88e53996260722619b462404f 100644 (file)
@@ -577,7 +577,9 @@ static void pjob_store_notify(const char* sharename, uint32 jobid, struct printj
 
        if (new_job) {
                notify_job_submitted(sharename, jobid, new_data->starttime);
-               notify_job_username(sharename, jobid, new_data->user);
+               notify_job_username(server_event_context(),
+                                   server_messaging_context(),
+                                   sharename, jobid, new_data->user);
        }
 
        if (new_job || !strequal(old_data->jobname, new_data->jobname))