From 19fea3242cf6234786b6cbb60631e0071f31ff9f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 4 Sep 2001 07:13:01 +0000 Subject: 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) --- source3/smbd/lanman.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'source3/smbd/lanman.c') 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(¤t_user, jobid, &errcode)) + if (print_job_delete(¤t_user, jobid, &werr)) errcode = NERR_Success; break; case 82: /* pause */ - if (print_job_pause(¤t_user, jobid, &errcode)) + if (print_job_pause(¤t_user, jobid, &werr)) errcode = NERR_Success; break; case 83: /* resume */ - if (print_job_resume(¤t_user, jobid, &errcode)) + if (print_job_resume(¤t_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(¤t_user, snum, &errcode)) errcode = NERR_Success; + if (print_queue_pause(¤t_user, snum, &werr)) errcode = NERR_Success; break; case 75: /* Resume queue */ - if (print_queue_resume(¤t_user, snum, &errcode)) errcode = NERR_Success; + if (print_queue_resume(¤t_user, snum, &werr)) errcode = NERR_Success; break; case 103: /* Purge */ - if (print_queue_purge(¤t_user, snum, &errcode)) errcode = NERR_Success; + if (print_queue_purge(¤t_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 */ -- cgit