1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Distinguish between NT informational and error codes.

(This used to be commit 02fe0e18df)
This commit is contained in:
Tim Potter 2001-08-21 03:04:41 +00:00
parent 252742f2b0
commit 1b7fab220f

View 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)
rcls = IVAL(cli->inbuf, smb_rcls);
else
rcls = CVAL(cli->inbuf, smb_rcls);
if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
return (rcls != 0);
/* Return error is error bits are set */
rcls = IVAL(cli->inbuf, smb_rcls);
return (rcls & 0xF0000000) == 0xC0000000;
}
/* Return error if error class in non-zero */
rcls = CVAL(cli->inbuf, smb_rcls);
return rcls != 0;
}
/* Return true if the last error was an NT error */