diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-29 15:35:53 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-29 15:35:53 +0000 |
commit | 89664898e2457de2986d515f6f476993ee1bbea2 (patch) | |
tree | 60042893c5b46ff8d39865fd39b5ba668e7ebf20 /source | |
parent | c2e2197e9d87795bda0198247c7bb132fe586fc1 (diff) | |
download | samba-89664898e2457de2986d515f6f476993ee1bbea2.tar.gz samba-89664898e2457de2986d515f6f476993ee1bbea2.tar.xz samba-89664898e2457de2986d515f6f476993ee1bbea2.zip |
called dump_data() from show_msg().
Diffstat (limited to 'source')
-rw-r--r-- | source/lib/util.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 9cecd4beb15..7f47cdbdb43 100644 --- a/source/lib/util.c +++ b/source/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)); } /******************************************************************* |