summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 15:55:19 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 18:09:34 +0200
commitc6e6aee0a0524cf68bb206b339040c4ccf208bb2 (patch)
tree675d8ba748c1acd8374abccbec19feddb6a9623a
parenta36103ca05109e402c4db57f892d61023d0e6104 (diff)
downloadsamba-c6e6aee0a0524cf68bb206b339040c4ccf208bb2.tar.gz
samba-c6e6aee0a0524cf68bb206b339040c4ccf208bb2.tar.bz2
samba-c6e6aee0a0524cf68bb206b339040c4ccf208bb2.zip
s3: Lift the server_messaging_context from print_queue_status
-rw-r--r--source3/include/printing.h2
-rw-r--r--source3/printing/printing.c9
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c10
3 files changed, 11 insertions, 10 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 8cb12e0938..909ac6e230 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -143,7 +143,7 @@ WERROR print_job_start(struct auth_serversupplied_info *server_info,
void print_job_endpage(int snum, uint32 jobid);
NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
uint32 jobid, enum file_close_type close_type);
-int print_queue_status(int snum,
+int print_queue_status(struct messaging_context *msg_ctx, int snum,
print_queue_struct **ppqueue,
print_status_struct *status);
WERROR print_queue_pause(struct auth_serversupplied_info *server_info,
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 72e388fda7..8a12814386 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2973,7 +2973,7 @@ static bool get_stored_queue_info(struct messaging_context *msg_ctx,
set queue = NULL and status = NULL if you just want to update the cache
****************************************************************************/
-int print_queue_status(int snum,
+int print_queue_status(struct messaging_context *msg_ctx, int snum,
print_queue_struct **ppqueue,
print_status_struct *status)
{
@@ -2986,7 +2986,7 @@ int print_queue_status(int snum,
/* make sure the database is up to date */
if (print_cache_expired(lp_const_servicename(snum), True))
- print_queue_update(server_messaging_context(), snum, False);
+ print_queue_update(msg_ctx, snum, False);
/* return if we are done */
if ( !ppqueue || !status )
@@ -3023,8 +3023,7 @@ int print_queue_status(int snum,
* of entries, and then only retrieve the queue if necessary.
*/
- if (!get_stored_queue_info(server_messaging_context(), pdb, snum,
- &count, ppqueue)) {
+ if (!get_stored_queue_info(msg_ctx, pdb, snum, &count, ppqueue)) {
release_print_db(pdb);
return 0;
}
@@ -3124,7 +3123,7 @@ WERROR print_queue_purge(struct auth_serversupplied_info *server_info,
msg_ctx,
snum,
JOB_ACCESS_ADMINISTER);
- njobs = print_queue_status(snum, &queue, &status);
+ njobs = print_queue_status(msg_ctx, snum, &queue, &status);
if ( can_job_admin )
become_root();
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index b7fb70d6b8..55f2001b5b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1403,7 +1403,8 @@ void update_monitored_printq_cache( void )
&& printer->notify.client_connected )
{
snum = print_queue_snum(printer->sharename);
- print_queue_status( snum, NULL, NULL );
+ print_queue_status(server_messaging_context(), snum,
+ NULL, NULL );
}
printer = printer->next;
@@ -3354,7 +3355,8 @@ static WERROR printer_notify_info(struct pipes_struct *p,
case JOB_NOTIFY_TYPE:
- count = print_queue_status(snum, &queue, &status);
+ count = print_queue_status(p->msg_ctx, snum, &queue,
+ &status);
for (j=0; j<count; j++) {
construct_notify_jobs_info(&queue[j], info,
@@ -6586,7 +6588,7 @@ WERROR _spoolss_EnumJobs(struct pipes_struct *p,
return result;
}
- count = print_queue_status(snum, &queue, &prt_status);
+ count = print_queue_status(p->msg_ctx, snum, &queue, &prt_status);
DEBUGADD(4,("count:[%d], status:[%d], [%s]\n",
count, prt_status.status, prt_status.message));
@@ -8602,7 +8604,7 @@ WERROR _spoolss_GetJob(struct pipes_struct *p,
return result;
}
- count = print_queue_status(snum, &queue, &prt_status);
+ count = print_queue_status(p->msg_ctx, snum, &queue, &prt_status);
DEBUGADD(4,("count:[%d], prt_status:[%d], [%s]\n",
count, prt_status.status, prt_status.message));