int fnum;
struct connection_struct *conn;
int fd;
+ unsigned int num_smb_operations;
uint16 rap_print_jobid;
SMB_DEV_T dev;
SMB_INO_T inode;
time_t lastused;
BOOL used;
int num_files_open;
+ unsigned int num_smb_operations; /* Count of smb operations on this tree. */
BOOL case_sensitive;
BOOL case_preserve;
return(ERROR_DOS(ERRDOS,ERRbadfid)); \
else if((fsp)->fd == -1) \
return(ERROR_DOS(ERRDOS,ERRbadaccess));\
+ (fsp)->num_smb_operations++;\
} while(0)
#define CHECK_READ(fsp) if (!(fsp)->can_read) \
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() ||