diff options
author | Luke Leighton <lkcl@samba.org> | 1998-04-07 15:59:05 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-04-07 15:59:05 +0000 |
commit | 0f8acce8ebb5b70ca0f3be96396ff9584e7db735 (patch) | |
tree | cd698750f22315882388c4226a1ed7d6dd1896c1 /source3/lib/util.c | |
parent | 724cab4d08d631c0afaac5e77356ca5336562eb0 (diff) | |
download | samba-0f8acce8ebb5b70ca0f3be96396ff9584e7db735.tar.gz samba-0f8acce8ebb5b70ca0f3be96396ff9584e7db735.tar.bz2 samba-0f8acce8ebb5b70ca0f3be96396ff9584e7db735.zip |
want all of data in show_msg at log levels > 50.
(This used to be commit 2245f4908ee3d33fd05f0a19abda89053cbfceb9)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 2c7b52bbef..3173d52692 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1250,44 +1250,50 @@ void dos_format(char *fname) string_replace(fname,'/','\\'); } - /******************************************************************* show a smb message structure ********************************************************************/ void show_msg(char *buf) { - int i; - int bcc=0; - - if (DEBUGLEVEL < 5) return; + int i; + int bcc=0; + + 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), + (int)CVAL(buf,smb_com), + (int)CVAL(buf,smb_rcls), + (int)CVAL(buf,smb_reh), + (int)SVAL(buf,smb_err), + (int)CVAL(buf,smb_flg), + (int)SVAL(buf,smb_flg2))); + DEBUG(5,("smb_tid=%d\nsmb_pid=%d\nsmb_uid=%d\nsmb_mid=%d\nsmt_wct=%d\n", + (int)SVAL(buf,smb_tid), + (int)SVAL(buf,smb_pid), + (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))); + } - 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), - (int)CVAL(buf,smb_com), - (int)CVAL(buf,smb_rcls), - (int)CVAL(buf,smb_reh), - (int)SVAL(buf,smb_err), - (int)CVAL(buf,smb_flg), - (int)SVAL(buf,smb_flg2))); - DEBUG(5,("smb_tid=%d\nsmb_pid=%d\nsmb_uid=%d\nsmb_mid=%d\nsmt_wct=%d\n", - (int)SVAL(buf,smb_tid), - (int)SVAL(buf,smb_pid), - (int)SVAL(buf,smb_uid), - (int)SVAL(buf,smb_mid), - (int)CVAL(buf,smb_wct))); + bcc = (int)SVAL(buf,smb_vwv+2*(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))); + DEBUG(5,("smb_bcc=%d\n",bcc)); - bcc = (int)SVAL(buf,smb_vwv+2*(CVAL(buf,smb_wct))); - DEBUG(5,("smb_bcc=%d\n",bcc)); + if (DEBUGLEVEL < 10) return; - if (DEBUGLEVEL < 10) return; + if (DEBUGLEVEL < 50) + { + bcc = MIN(bcc, 512); + } - dump_data(10, smb_buf(buf), MIN(bcc, 512)); + dump_data(10, smb_buf(buf), bcc); } - /******************************************************************* return the length of an smb packet ********************************************************************/ |