summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 16:50:17 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 18:09:36 +0200
commit9ff35d0690f0938e489523d0528c9e5700cf82a3 (patch)
tree5ab8a30af545fe4e4a8c69cd2b26cdf98912d7ae /source3/printing
parent128976e01121c877cb815e60504fb6a5391255a2 (diff)
downloadsamba-9ff35d0690f0938e489523d0528c9e5700cf82a3.tar.gz
samba-9ff35d0690f0938e489523d0528c9e5700cf82a3.tar.bz2
samba-9ff35d0690f0938e489523d0528c9e5700cf82a3.zip
s3: Lift the server_messaging_context from pjob_store_notify
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/printing.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 22330256a1..f314c3342d 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -557,7 +557,10 @@ static uint32 map_to_spoolss_status(uint32 lpq_status)
return 0;
}
-static void pjob_store_notify(const char* sharename, uint32 jobid, struct printjob *old_data,
+static void pjob_store_notify(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char* sharename, uint32 jobid,
+ struct printjob *old_data,
struct printjob *new_data)
{
bool new_job = False;
@@ -576,41 +579,34 @@ 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(server_event_context(),
- server_messaging_context(),
+ notify_job_submitted(ev, msg_ctx,
sharename, jobid, new_data->starttime);
- notify_job_username(server_event_context(),
- server_messaging_context(),
+ notify_job_username(ev, msg_ctx,
sharename, jobid, new_data->user);
}
if (new_job || !strequal(old_data->jobname, new_data->jobname))
- notify_job_name(server_event_context(),
- server_messaging_context(),
+ notify_job_name(ev, msg_ctx,
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(server_event_context(),
- server_messaging_context(),
+ notify_job_name(ev, msg_ctx,
sharename, jobid, new_data->jobname);
if (new_job || old_data->status != new_data->status)
- notify_job_status(server_event_context(),
- server_messaging_context(),
+ notify_job_status(ev, msg_ctx,
sharename, jobid,
map_to_spoolss_status(new_data->status));
if (new_job || old_data->size != new_data->size)
- notify_job_total_bytes(server_event_context(),
- server_messaging_context(),
+ notify_job_total_bytes(ev, msg_ctx,
sharename, jobid, new_data->size);
if (new_job || old_data->page_count != new_data->page_count)
- notify_job_total_pages(server_event_context(),
- server_messaging_context(),
+ notify_job_total_pages(ev, msg_ctx,
sharename, jobid, new_data->page_count);
}
@@ -688,13 +684,18 @@ static bool pjob_store(const char* sharename, uint32 jobid, struct printjob *pjo
{
if ( unpack_pjob( old_data.dptr, old_data.dsize, &old_pjob ) != -1 )
{
- pjob_store_notify( sharename, jobid, &old_pjob , pjob );
+ pjob_store_notify(server_event_context(),
+ server_messaging_context(),
+ sharename, jobid, &old_pjob,
+ pjob);
talloc_free(old_pjob.devmode);
}
}
else {
/* new job */
- pjob_store_notify( sharename, jobid, NULL, pjob );
+ pjob_store_notify(server_event_context(),
+ server_messaging_context(),
+ sharename, jobid, NULL, pjob);
}
}