summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-08-30 00:45:59 +0000
committerJeremy Allison <jra@samba.org>2000-08-30 00:45:59 +0000
commitd407579b94ee2647d1e51c536534024e5c4c51ad (patch)
treec4a3ae28143ea3bfc4fe11022455b3d85f94c321 /source3/printing
parent3b33053b886b88bb7546f77dcdb038fcdc501c6c (diff)
downloadsamba-d407579b94ee2647d1e51c536534024e5c4c51ad.tar.gz
samba-d407579b94ee2647d1e51c536534024e5c4c51ad.tar.bz2
samba-d407579b94ee2647d1e51c536534024e5c4c51ad.zip
Implemented AbortPrinter() from Gerald's Win32 test code. Just purge all
possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy. (This used to be commit 6d081a9017f87f59b7189ba507e211db01c40af5)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/printing.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index f5f40d8b9c..cf3748ed16 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -890,13 +890,14 @@ int print_queue_snum(char *qname)
/****************************************************************************
pause a queue
****************************************************************************/
-BOOL print_queue_pause(struct current_user *user, int snum)
+BOOL print_queue_pause(struct current_user *user, int snum, int *errcode)
{
int ret;
if (!user) return False;
if (!print_access_check(user, snum, PRINTER_ACE_MANAGE_DOCUMENTS)) {
+ *errcode = ERROR_ACCESS_DENIED;
return False;
}
@@ -912,11 +913,12 @@ BOOL print_queue_pause(struct current_user *user, int snum)
/****************************************************************************
resume a queue
****************************************************************************/
-BOOL print_queue_resume(struct current_user *user, int snum)
+BOOL print_queue_resume(struct current_user *user, int snum, int *errcode)
{
int ret;
if (!print_access_check(user, snum, PRINTER_ACE_MANAGE_DOCUMENTS)) {
+ *errcode = ERROR_ACCESS_DENIED;
return False;
}
@@ -932,13 +934,14 @@ BOOL print_queue_resume(struct current_user *user, int snum)
/****************************************************************************
purge a queue - implemented by deleting all jobs that we can delete
****************************************************************************/
-BOOL print_queue_purge(struct current_user *user, int snum)
+BOOL print_queue_purge(struct current_user *user, int snum, int *errcode)
{
print_queue_struct *queue;
print_status_struct status;
int njobs, i;
if (!print_access_check(user, snum, PRINTER_ACE_MANAGE_DOCUMENTS)) {
+ *errcode = ERROR_ACCESS_DENIED;
return False;
}