Disable the smb_cmd.log by default.

This commit is contained in:
Seth Hall 2016-02-19 00:23:05 -05:00
parent f9cbee20f8
commit dbb5992f43
3 changed files with 6 additions and 2 deletions

View file

@ -130,6 +130,10 @@ export {
smb : Info &optional; smb : Info &optional;
}; };
## Optionally write out the SMB commands log. This is
## primarily useful for debugging so is disabled by default.
const write_cmd_log = F &redef;
## This is an internally used function. ## This is an internally used function.
const set_current_file: function(smb: Info, file_id: count) &redef; const set_current_file: function(smb: Info, file_id: count) &redef;

View file

@ -64,7 +64,7 @@ event smb1_message(c: connection, hdr: SMB1::Header, is_orig: bool) &priority=-5
# so let's get rid of it. # so let's get rid of it.
delete c$smb$pending_cmds[hdr$mid]; delete c$smb$pending_cmds[hdr$mid];
if ( c?$smb ) if ( SMB::write_cmd_log && c?$smb )
Log::write(SMB::CMD_LOG, c$smb); Log::write(SMB::CMD_LOG, c$smb);
} }

View file

@ -64,7 +64,7 @@ event smb2_message(c: connection, hdr: SMB2::Header, is_orig: bool) &priority=-5
# so let's get rid of it. # so let's get rid of it.
delete c$smb$pending_cmds[hdr$message_id]; delete c$smb$pending_cmds[hdr$message_id];
if ( c?$smb ) if ( SMB::write_cmd_log && c?$smb )
Log::write(SMB::CMD_LOG, c$smb); Log::write(SMB::CMD_LOG, c$smb);
} }