summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-07-07 14:59:41 -0700
committerJeremy Allison <jra@samba.org>2011-07-08 01:14:53 +0200
commit8dc7029561b4d2e02b1f12583b7b871fd4d2ba14 (patch)
treeeae69cfe1317e08b390365451df97a92d8d73892 /source3/smbd/process.c
parenteea210eba7c20e6d04b13cf8ccd3011ee7c99157 (diff)
downloadsamba-8dc7029561b4d2e02b1f12583b7b871fd4d2ba14.tar.gz
samba-8dc7029561b4d2e02b1f12583b7b871fd4d2ba14.tar.bz2
samba-8dc7029561b4d2e02b1f12583b7b871fd4d2ba14.zip
Fix bug #8293 - SMB2 doesn't rotate the log files often enough.
Move the num_requests field out of the smb1 struct into the generic struct smbd_server_connection struct. Use it to count SMB2 requests as well as SMB1 and ensure that check_log_size() is called every 50 SMB2 requests. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 8 01:14:53 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index ca526267d2..339d005b42 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1621,7 +1621,7 @@ static void process_smb(struct smbd_server_connection *sconn,
sconn->trans_num++;
done:
- sconn->smb1.num_requests++;
+ sconn->num_requests++;
/* The timeout_processing function isn't run nearly
often enough to implement 'max log size' without
@@ -1630,7 +1630,7 @@ done:
level 10. Checking every 50 SMBs is a nice
tradeoff of performance vs log file size overrun. */
- if ((sconn->smb1.num_requests % 50) == 0 &&
+ if ((sconn->num_requests % 50) == 0 &&
need_to_check_log_size()) {
change_to_root_user();
check_log_size();