summaryrefslogtreecommitdiff
path: root/source3/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
commit77aec4ae6307c0ad0b843bbf23d64ccb1aaf7476 (patch)
tree92e15c7219e20ad5e58833b83f1387feb3e1125e /source3/libsmb/smberr.c
parentcc512947c9e1744c5541252c7cc934ebcd2e6961 (diff)
downloadsamba-77aec4ae6307c0ad0b843bbf23d64ccb1aaf7476.tar.gz
samba-77aec4ae6307c0ad0b843bbf23d64ccb1aaf7476.tar.bz2
samba-77aec4ae6307c0ad0b843bbf23d64ccb1aaf7476.zip
Rolled back tree state to 11:59pm 8th November 1997 EST to
remove problems. Jeremy (This used to be commit 4a36ac236c2ad634f05efcd0179875d09988614a)
Diffstat (limited to 'source3/libsmb/smberr.c')
-rw-r--r--source3/libsmb/smberr.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/source3/libsmb/smberr.c b/source3/libsmb/smberr.c
index 35cd0bf88f..5149568c04 100644
--- a/source3/libsmb/smberr.c
+++ b/source3/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);
}