summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-29 15:35:53 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-29 15:35:53 +0000
commitebafb1e288ddd23e32adf88a426d76cf9d590c5e (patch)
treea2775494fb064e0c626e08d7e6e01049b52b3bf7
parent0db5b8fdc97d24bdfadefb9b043df614644c578a (diff)
downloadsamba-ebafb1e288ddd23e32adf88a426d76cf9d590c5e.tar.gz
samba-ebafb1e288ddd23e32adf88a426d76cf9d590c5e.tar.bz2
samba-ebafb1e288ddd23e32adf88a426d76cf9d590c5e.zip
called dump_data() from show_msg().
(This used to be commit 89664898e2457de2986d515f6f476993ee1bbea2)
-rw-r--r--source3/lib/util.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 9cecd4beb1..7f47cdbdb4 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1165,10 +1165,9 @@ void dos_format(char *fname)
void show_msg(char *buf)
{
int i;
- int j;
int bcc=0;
- if (DEBUGLEVEL < 5)
- return;
+
+ if (DEBUGLEVEL < 5) return;
DEBUG(5,("size=%d\nsmb_com=0x%x\nsmb_rcls=%d\nsmb_reh=%d\nsmb_err=%d\nsmb_flg=%d\nsmb_flg2=%d\n",
smb_len(buf),
@@ -1184,35 +1183,17 @@ void show_msg(char *buf)
(int)SVAL(buf,smb_uid),
(int)SVAL(buf,smb_mid),
(int)CVAL(buf,smb_wct)));
+
for (i=0;i<(int)CVAL(buf,smb_wct);i++)
DEBUG(5,("smb_vwv[%d]=%d (0x%X)\n",i,
SVAL(buf,smb_vwv+2*i),SVAL(buf,smb_vwv+2*i)));
+
bcc = (int)SVAL(buf,smb_vwv+2*(CVAL(buf,smb_wct)));
DEBUG(5,("smb_bcc=%d\n",bcc));
- if (DEBUGLEVEL < 10)
- return;
- for (i = 0; i < MIN(bcc, 512); i += 16)
- {
- for (j = 0; j < 16 && i+j < MIN(bcc,512); j++)
- {
- DEBUG(10,("%2X ",CVAL(smb_buf(buf),i+j)));
- if (j == 7) DEBUG(10, (" "));
+ if (DEBUGLEVEL < 10) return;
- }
- DEBUG(10,(" "));
-
- for (j = 0; j < 16 && i+j < MIN(bcc,512); j++)
- {
- unsigned char c = CVAL(smb_buf(buf),i+j);
- if (c < 32 || c > 128) c = '.';
- DEBUG(10,("%c",c));
-
- if (j == 7) DEBUG(10, (" "));
- }
-
- DEBUG(10,("\n"));
-}
+ dump_data(10, smb_buf(buf), MIN(bcc, 512));
}
/*******************************************************************