summaryrefslogtreecommitdiff
path: root/source3/smbd/lanman.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-04 07:13:01 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-04 07:13:01 +0000
commit19fea3242cf6234786b6cbb60631e0071f31ff9f (patch)
tree1de6e79890a80a1e03cf0dce5813513aaf51bc59 /source3/smbd/lanman.c
parent55cf37488f66eba2826dba08e80dd4ab6df33fc3 (diff)
downloadsamba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.gz
samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.bz2
samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.zip
the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
Diffstat (limited to 'source3/smbd/lanman.c')
-rw-r--r--source3/smbd/lanman.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 21d18fc88c..eb0e7154a2 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2016,6 +2016,7 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param
char *p = skip_string(str2,1);
int jobid, errcode;
extern struct current_user current_user;
+ WERROR werr = WERR_OK;
jobid = SVAL(p,0);
@@ -2036,18 +2037,21 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param
switch (function) {
case 81: /* delete */
- if (print_job_delete(&current_user, jobid, &errcode))
+ if (print_job_delete(&current_user, jobid, &werr))
errcode = NERR_Success;
break;
case 82: /* pause */
- if (print_job_pause(&current_user, jobid, &errcode))
+ if (print_job_pause(&current_user, jobid, &werr))
errcode = NERR_Success;
break;
case 83: /* resume */
- if (print_job_resume(&current_user, jobid, &errcode))
+ if (print_job_resume(&current_user, jobid, &werr))
errcode = NERR_Success;
break;
}
+
+ if (!W_ERROR_IS_OK(werr))
+ errcode = W_ERROR_V(werr);
out:
SSVAL(*rparam,0,errcode);
@@ -2070,6 +2074,7 @@ static BOOL api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid, char *param
char *QueueName = skip_string(str2,1);
int errcode = NERR_notsupported;
int snum;
+ WERROR werr = WERR_OK;
extern struct current_user current_user;
/* check it's a supported varient */
@@ -2089,16 +2094,18 @@ static BOOL api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid, char *param
switch (function) {
case 74: /* Pause queue */
- if (print_queue_pause(&current_user, snum, &errcode)) errcode = NERR_Success;
+ if (print_queue_pause(&current_user, snum, &werr)) errcode = NERR_Success;
break;
case 75: /* Resume queue */
- if (print_queue_resume(&current_user, snum, &errcode)) errcode = NERR_Success;
+ if (print_queue_resume(&current_user, snum, &werr)) errcode = NERR_Success;
break;
case 103: /* Purge */
- if (print_queue_purge(&current_user, snum, &errcode)) errcode = NERR_Success;
+ if (print_queue_purge(&current_user, snum, &werr)) errcode = NERR_Success;
break;
}
+ if (!W_ERROR_IS_OK(werr)) errcode = W_ERROR_V(werr);
+
out:
SSVAL(*rparam,0,errcode);
SSVAL(*rparam,2,0); /* converter word */