From f60ad8ded6e614f3c0abb2679d3a75096fc595d3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Apr 2005 23:32:56 +0000 Subject: r6346: Add a counter for the number of SMB operations per connection/file. You will need to do a make clean after SVN updating this. Next will come a smbcontrol message to dump this info. This should be interesting to profile client activity. Jeremy. (This used to be commit 743174da86ac724fc9ee3d4b7bd9a2a97a234bd8) --- source3/smbd/process.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/smbd/process.c') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 1bf6f4f9d1..e79686b43e 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -962,8 +962,12 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize return(ERROR_DOS(ERRSRV,ERRaccess)); /* load service specific parameters */ - if (conn && !set_current_service(conn,SVAL(inbuf,smb_flg),(flags & (AS_USER|DO_CHDIR)?True:False))) - return(ERROR_DOS(ERRSRV,ERRaccess)); + if (conn) { + if (!set_current_service(conn,SVAL(inbuf,smb_flg),(flags & (AS_USER|DO_CHDIR)?True:False))) { + return(ERROR_DOS(ERRSRV,ERRaccess)); + } + conn->num_smb_operations++; + } /* does this protocol need to be run as guest? */ if ((flags & AS_GUEST) && (!change_to_guest() || -- cgit