From 520fef4278bd43073782e1c75f67900f96fa6ddf Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 1 Apr 2009 18:30:29 +0000 Subject: [PATCH] windows-afsd-smb-logging-20090401 LICENSE MIT Add more info about the smb request to the log entry that is written to afsd_init.log if the request took longer than 45 seconds to complete. --- src/WINNT/afsd/smb.c | 9 +++++---- src/WINNT/afsd/smb3.c | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 3edda818f..626407935 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -8390,7 +8390,7 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp, cm_fid_t afid = {0,0,0,0,0}; uidp = smb_FindUID(vcp, smbp->uid, 0); - smb_LookupTIDPath(vcp,((smb_t *)inp)->tid, &treepath); + smb_LookupTIDPath(vcp, smbp->tid, &treepath); fidp = smb_FindFID(vcp, inp->fid, 0); if (fidp) { @@ -8404,9 +8404,10 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp, pathname = inp->stringsp->wdata; } - afsi_log("Request %s duration %d ms user %S tid \"%S\" path? \"%S\" afid (%d.%d.%d.%d)", - opName, newTime - oldTime, - uidp ? uidp->unp->name : NULL, + afsi_log("Request %s duration %d ms user 0x%x \"%S\" pid 0x%x mid 0x%x tid 0x%x \"%S\" path? \"%S\" afid (%d.%d.%d.%d)", + opName, newTime - oldTime, + smbp->uid, uidp ? uidp->unp->name : NULL, + smbp->pid, smbp->mid, smbp->tid, treepath, pathname, afid.cell, afid.volume, afid.vnode, afid.unique); diff --git a/src/WINNT/afsd/smb3.c b/src/WINNT/afsd/smb3.c index a08bca74a..955e893a3 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -2261,9 +2261,10 @@ long smb_ReceiveV3Tran2A(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp) pathname = inp->stringsp->wdata; } - afsi_log("Request %s duration %d ms user %S tid \"%S\" path? \"%S\" afid (%d.%d.%d.%d)", + afsi_log("Request %s duration %d ms user 0x%x \"%S\" pid 0x%x mid 0x%x tid 0x%x \"%S\" path? \"%S\" afid (%d.%d.%d.%d)", myCrt_2Dispatch(asp->opcode), newTime - oldTime, - uidp ? uidp->unp->name : NULL, + asp->uid, uidp ? uidp->unp->name : NULL, + asp->pid, asp->mid, asp->tid, treepath, pathname, afid.cell, afid.volume, afid.vnode, afid.unique); -- 2.39.5