summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smberr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-11-10 19:23:17 +0000
committerJeremy Allison <jra@samba.org>1997-11-10 19:23:17 +0000
commit4a36ac236c2ad634f05efcd0179875d09988614a (patch)
tree4bc08410d20f7821516d3cea9bb00b695ab005fd /source/libsmb/smberr.c
parentad43183d2dd62a808c9fba03f81562362d4de713 (diff)
downloadsamba-4a36ac236c2ad634f05efcd0179875d09988614a.tar.gz
samba-4a36ac236c2ad634f05efcd0179875d09988614a.tar.xz
samba-4a36ac236c2ad634f05efcd0179875d09988614a.zip
Rolled back tree state to 11:59pm 8th November 1997 EST to
remove problems. Jeremy
Diffstat (limited to 'source/libsmb/smberr.c')
-rw-r--r--source/libsmb/smberr.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/source/libsmb/smberr.c b/source/libsmb/smberr.c
index 35cd0bf88f0..5149568c045 100644
--- a/source/libsmb/smberr.c
+++ b/source/libsmb/smberr.c
@@ -151,28 +151,9 @@ return a SMB error string from a SMB buffer
char *smb_errstr(char *inbuf)
{
static pstring ret;
- int i,j;
- BOOL nt_errors = (SVAL(inbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES) == FLAGS2_32_BIT_ERROR_CODES;
-
- if (nt_errors)
- {
- char *nt_errstr = NULL;
- uint32 nt_err = IVAL(inbuf, smb_rcls);
- uint16 nt_num = nt_err & 0x0000ffff;
- uint16 class = (nt_err & 0xffff0000) >> 16;
-
- /* maybe lookup the error message in the nt error codes... */
- if ((nt_errstr = get_nt_error_msg(nt_num)) != NULL)
- {
- sprintf(ret,"NT Error: (%4x, %s)", class, nt_errstr);
- return ret;
- }
- sprintf(ret,"NT Error: Unknown error (%4x %4x)", class, nt_num);
- }
- else
- {
int class = CVAL(inbuf,smb_rcls);
int num = SVAL(inbuf,smb_err);
+ int i,j;
for (i=0;err_classes[i].class;i++)
if (err_classes[i].code == class)
@@ -195,8 +176,7 @@ char *smb_errstr(char *inbuf)
sprintf(ret,"%s - %d",err_classes[i].class,num);
return ret;
}
- sprintf(ret,"Error: Unknown error (%4x,%d)", class, num);
- }
-
+
+ sprintf(ret,"Error: Unknown error (%d,%d)",class,num);
return(ret);
}