summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-08-21 03:04:41 +0000
committerTim Potter <tpot@samba.org>2001-08-21 03:04:41 +0000
commit1b7fab220f7b30c7ddd73c00544902332ce8525d (patch)
treeac9f1f1301a7155e4f7b23908c5fb3287cb5e902 /source3/libsmb
parent252742f2b021e8d7a06c8c86e099e616511f9996 (diff)
downloadsamba-1b7fab220f7b30c7ddd73c00544902332ce8525d.tar.gz
samba-1b7fab220f7b30c7ddd73c00544902332ce8525d.tar.bz2
samba-1b7fab220f7b30c7ddd73c00544902332ce8525d.zip
Distinguish between NT informational and error codes.
(This used to be commit 02fe0e18dfcb8cc83b3cf0b6c8dd4dc1ddb7e196)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clierror.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c
index 022e808fea..59a11dcc60 100644
--- a/source3/libsmb/clierror.c
+++ b/source3/libsmb/clierror.c
@@ -255,12 +255,18 @@ BOOL cli_is_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), rcls = 0;
- if (flgs2 & FLAGS2_32_BIT_ERROR_CODES)
+ if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
+
+ /* Return error is error bits are set */
+
rcls = IVAL(cli->inbuf, smb_rcls);
- else
- rcls = CVAL(cli->inbuf, smb_rcls);
+ return (rcls & 0xF0000000) == 0xC0000000;
+ }
+
+ /* Return error if error class in non-zero */
- return (rcls != 0);
+ rcls = CVAL(cli->inbuf, smb_rcls);
+ return rcls != 0;
}
/* Return true if the last error was an NT error */