]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Distinguish between NT informational and error codes.
authorTim Potter <tpot@samba.org>
Tue, 21 Aug 2001 03:04:41 +0000 (03:04 +0000)
committerTim Potter <tpot@samba.org>
Tue, 21 Aug 2001 03:04:41 +0000 (03:04 +0000)
(This used to be commit 02fe0e18dfcb8cc83b3cf0b6c8dd4dc1ddb7e196)

source3/libsmb/clierror.c

index 022e808fea99c98c4707442a72017c09f36d6809..59a11dcc60f028119e3f2cfba5c2dd5ce5209204 100644 (file)
@@ -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 */