summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-06 01:10:33 +0200
committerGünther Deschner <gd@samba.org>2009-05-06 10:19:04 +0200
commit9966541f89b45834cdf63060202621f885bf9f5c (patch)
tree0f689b5ae92a753a6b18aba932a8fea2dfd164bf /source3/smbd
parent4cbd0c77e42627c76dda88af5326ef91415a652d (diff)
downloadsamba-9966541f89b45834cdf63060202621f885bf9f5c.tar.gz
samba-9966541f89b45834cdf63060202621f885bf9f5c.tar.bz2
samba-9966541f89b45834cdf63060202621f885bf9f5c.zip
s3-printing: simplify print_queue helper functions and return WERROR.
Guenther
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/lanman.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 979e5b57a4..1672c518ac 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2869,23 +2869,20 @@ static bool api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid,
switch (function) {
case 74: /* Pause queue */
- if (print_queue_pause(conn->server_info, snum, &werr)) {
- errcode = NERR_Success;
- }
+ werr = print_queue_pause(conn->server_info, snum);
break;
case 75: /* Resume queue */
- if (print_queue_resume(conn->server_info, snum, &werr)) {
- errcode = NERR_Success;
- }
+ werr = print_queue_resume(conn->server_info, snum);
break;
case 103: /* Purge */
- if (print_queue_purge(conn->server_info, snum, &werr)) {
- errcode = NERR_Success;
- }
+ werr = print_queue_purge(conn->server_info, snum);
+ break;
+ default:
+ werr = WERR_NOT_SUPPORTED;
break;
}
- if (!W_ERROR_IS_OK(werr)) errcode = W_ERROR_V(werr);
+ errcode = W_ERROR_V(werr);
out:
SSVAL(*rparam,0,errcode);