The branch, master has been updated via f7e14a8... s3: Reduce the load on the echo handler via c672797... s3: Slightly simplify the logic in smbd_server_echo_handler via c7a2e52... s3: Slightly simplify the logic in smbd_server_connection_handler from 277248a... s3: ?true:false is a *bit* pointless :-)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f7e14a8e5e65b15d83dc1be3fe2dc47b5c46d764 Author: Volker Lendecke <v...@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(). commit c672797a0a2fe3aa3bd2d2ef449cb5866d289981 Author: Volker Lendecke <v...@samba.org> Date: Thu Aug 12 12:48:43 2010 +0200 s3: Slightly simplify the logic in smbd_server_echo_handler commit c7a2e52ef171512e2c0f80a57dd3f61b4cf0dba1 Author: Volker Lendecke <v...@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 2e31913..adfcad1 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; } } @@ -2665,6 +2671,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