DEVEL15-windows-afsd-log-smb-mid-20090328

LICENSE MIT

For each SMB transation log the 'mid' field of the smb packet.
The 'mid' field can be used as a reference against the mrxsmb request
logging for debugging purposes.


(cherry picked from commit 07c187c843)
This commit is contained in:
Jeffrey Altman 2009-03-28 23:26:17 +00:00
parent 4e07b9d6b2
commit 0b7daceafd

View File

@ -8358,25 +8358,30 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
if (dp->procp) {
/* we have a recognized operation */
char * opName = myCrt_Dispatch(inp->inCom);
smb_t *smbp;
if (inp->inCom == 0x1d)
smbp = (smb_t *) inp;
osi_Log5(smb_logp,"Dispatch %s mid 0x%x vcp 0x%p lana %d lsn %d",
opName, smbp->mid, vcp,vcp->lana,vcp->lsn);
if (inp->inCom == 0x1d) {
/* Raw Write */
code = smb_ReceiveCoreWriteRaw (vcp, inp, outp, rwcp);
else {
osi_Log4(smb_logp,"Dispatch %s vcp 0x%p lana %d lsn %d",
opName,vcp,vcp->lana,vcp->lsn);
} else {
code = (*(dp->procp)) (vcp, inp, outp);
osi_Log4(smb_logp,"Dispatch return code 0x%x vcp 0x%p lana %d lsn %d",
code,vcp,vcp->lana,vcp->lsn);
}
osi_Log5(smb_logp,"Dispatch return code 0x%x mid 0x%x vcp 0x%p lana %d lsn %d",
code, smbp->mid, vcp,vcp->lana,vcp->lsn);
newTime = GetTickCount();
osi_Log3(smb_logp, "Dispatch %s mid 0x%x duration %d ms",
opName, smbp->mid, newTime - oldTime);
#ifdef LOG_PACKET
if ( code == CM_ERROR_BADSMB ||
code == CM_ERROR_BADOP )
smb_LogPacket(inp);
#endif /* LOG_PACKET */
}
newTime = GetTickCount();
osi_Log2(smb_logp, "Dispatch %s duration %d ms", opName, newTime - oldTime);
/* ReceiveV3Tran2A handles its own logging */
if (inp->inCom != 0x32 && newTime - oldTime > 45000) {