summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:52:59 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:27 +0200
commitcc280f0cd1f970b044011dee386e15ec87eccec8 (patch)
treeee213b6dadfef0b644cc2a30f4234986f0740fe3
parent9723f33ef54235b27d0126810fdd7546d2510f23 (diff)
downloadsamba-cc280f0cd1f970b044011dee386e15ec87eccec8.tar.gz
samba-cc280f0cd1f970b044011dee386e15ec87eccec8.tar.bz2
samba-cc280f0cd1f970b044011dee386e15ec87eccec8.zip
s3: Lift the smbd_messaging_context from print_queue_purge
-rw-r--r--source3/include/printing.h3
-rw-r--r--source3/printing/printing.c5
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/source3/include/printing.h b/source3/include/printing.h
index fd57acec39..95b0ec6279 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -148,6 +148,7 @@ WERROR print_queue_pause(struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx, int snum);
WERROR print_queue_resume(struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx, int snum);
-WERROR print_queue_purge(struct auth_serversupplied_info *server_info, int snum);
+WERROR print_queue_purge(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx, int snum);
#endif /* PRINTING_H_ */
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 26679110f6..9d98d5dff1 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -3107,7 +3107,8 @@ WERROR print_queue_resume(struct auth_serversupplied_info *server_info,
Purge a queue - implemented by deleting all jobs that we can delete.
****************************************************************************/
-WERROR print_queue_purge(struct auth_serversupplied_info *server_info, int snum)
+WERROR print_queue_purge(struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx, int snum)
{
print_queue_struct *queue;
print_status_struct status;
@@ -3118,7 +3119,7 @@ WERROR print_queue_purge(struct auth_serversupplied_info *server_info, int snum)
print_queue_update(snum, True);
can_job_admin = print_access_check(server_info,
- smbd_messaging_context(),
+ msg_ctx,
snum,
JOB_ACCESS_ADMINISTER);
njobs = print_queue_status(snum, &queue, &status);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 6d6463876a..ac95486d56 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5369,7 +5369,7 @@ static WERROR control_printer(struct policy_handle *handle, uint32_t command,
errcode = print_queue_resume(p->server_info, p->msg_ctx, snum);
break;
case SPOOLSS_PRINTER_CONTROL_PURGE:
- errcode = print_queue_purge(p->server_info, snum);
+ errcode = print_queue_purge(p->server_info, p->msg_ctx, snum);
break;
default:
return WERR_UNKNOWN_LEVEL;