diff options
author | Günther Deschner <gd@samba.org> | 2009-05-06 01:10:33 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-05-06 10:19:04 +0200 |
commit | 9966541f89b45834cdf63060202621f885bf9f5c (patch) | |
tree | 0f689b5ae92a753a6b18aba932a8fea2dfd164bf /source3/smbd/lanman.c | |
parent | 4cbd0c77e42627c76dda88af5326ef91415a652d (diff) | |
download | samba-9966541f89b45834cdf63060202621f885bf9f5c.tar.gz samba-9966541f89b45834cdf63060202621f885bf9f5c.tar.xz samba-9966541f89b45834cdf63060202621f885bf9f5c.zip |
s3-printing: simplify print_queue helper functions and return WERROR.
Guenther
Diffstat (limited to 'source3/smbd/lanman.c')
-rw-r--r-- | source3/smbd/lanman.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 979e5b57a44..1672c518ac2 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); |