[SCM] Samba Shared Repository - branch v3-6-test updated
Jeremy Allison
jra at samba.org
Fri Aug 13 17:35:04 MDT 2010
The branch, v3-6-test has been updated
via 267320b... s3: Reduce the load on the echo handler
via 327021e... s3: Slightly simplify the logic in smbd_server_echo_handler (cherry picked from commit c672797a0a2fe3aa3bd2d2ef449cb5866d289981)
via 993fc37... s3: Slightly simplify the logic in smbd_server_connection_handler
from 685035c... s3-dcerpc: fix build warning seen with -O3.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 267320b6ffa4f4930a52033b1bcc636286052df5
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 12 12:55:11 2010 +0200
s3: Reduce the load on the echo handler
If the parent is fast enough, the echo handler should not step in. When the
socket becomes readable, the echo handler goes to sleep for a second. If within
that second, the parent has picked up the SMB request from the net, the echo
handler will just go back to select().
(cherry picked from commit f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764)
commit 327021e1514f008a8eb9d8ff0f8e63e3193f4ca3
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 12 12:48:43 2010 +0200
s3: Slightly simplify the logic in smbd_server_echo_handler
(cherry picked from commit c672797a0a2fe3aa3bd2d2ef449cb5866d289981)
commit 993fc374c470fc77edd5384de895a7c94397182b
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 12 12:48:30 2010 +0200
s3: Slightly simplify the logic in smbd_server_connection_handler
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/process.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index b867ba1..cd975a6 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2331,8 +2331,11 @@ static void smbd_server_connection_handler(struct event_context *ev,
if (flags & EVENT_FD_WRITE) {
smbd_server_connection_write_handler(conn);
- } else if (flags & EVENT_FD_READ) {
+ return;
+ }
+ if (flags & EVENT_FD_READ) {
smbd_server_connection_read_handler(conn, smbd_server_fd());
+ return;
}
}
@@ -2346,9 +2349,12 @@ static void smbd_server_echo_handler(struct event_context *ev,
if (flags & EVENT_FD_WRITE) {
smbd_server_connection_write_handler(conn);
- } else if (flags & EVENT_FD_READ) {
+ return;
+ }
+ if (flags & EVENT_FD_READ) {
smbd_server_connection_read_handler(
conn, conn->smb1.echo_handler.trusted_fd);
+ return;
}
}
@@ -2662,6 +2668,8 @@ static void smbd_echo_reader(struct tevent_context *ev,
bool ok;
bool encrypted = false;
+ smb_msleep(1000);
+
ok = smbd_lock_socket_internal(sconn);
if (!ok) {
DEBUG(0, ("%s: failed to lock socket\n",
--
Samba Shared Repository
More information about the samba-cvs
mailing list