summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-10 19:18:56 +0000
committerJeremy Allison <jra@samba.org>2001-12-10 19:18:56 +0000
commit775c3876dbd02a2beae0626b2e735583ccedffbb (patch)
tree3259297ad7778587391b53ab248a7b50d038fcce
parent3bc9ef34b1213b2b1fad86521cd5ec9b413ce2e3 (diff)
downloadsamba-775c3876dbd02a2beae0626b2e735583ccedffbb.tar.gz
samba-775c3876dbd02a2beae0626b2e735583ccedffbb.tar.bz2
samba-775c3876dbd02a2beae0626b2e735583ccedffbb.zip
RAP error strings take precedence as they are not encoded in the SMB header
(ie. the call can succeed, but still be an encoded error). Jeremy. (This used to be commit 3c68b94199ff08b205d1eb14da56804936b900a8)
-rw-r--r--source3/libsmb/clierror.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c
index e4d931b965..cd1f86a476 100644
--- a/source3/libsmb/clierror.c
+++ b/source3/libsmb/clierror.c
@@ -72,7 +72,14 @@ char *cli_errstr(struct cli_state *cli)
uint8 errclass;
int i;
- /* Case #1: 32-bit NT errors */
+ /* Case #1: RAP error */
+ for (i = 0; rap_errmap[i].message != NULL; i++) {
+ if (rap_errmap[i].err == cli->rap_error) {
+ return rap_errmap[i].message;
+ }
+ }
+
+ /* Case #2: 32-bit NT errors */
if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
NTSTATUS status = NT_STATUS(IVAL(cli->inbuf,smb_rcls));
@@ -81,18 +88,11 @@ char *cli_errstr(struct cli_state *cli)
cli_dos_error(cli, &errclass, &errnum);
- /* Case #2: SMB error */
+ /* Case #3: SMB error */
if (errclass != 0)
return cli_smb_errstr(cli);
- /* Case #3: RAP error */
- for (i = 0; rap_errmap[i].message != NULL; i++) {
- if (rap_errmap[i].err == cli->rap_error) {
- return rap_errmap[i].message;
- }
- }
-
slprintf(cli_error_message, sizeof(cli_error_message) - 1, "code %d",
cli->rap_error);