From: Stefan Metzmacher Date: Wed, 21 Jan 2009 06:33:19 +0000 (+0100) Subject: s3:smbd: we don't need to call message_dispatch() anymore it's event triggered now X-Git-Tag: samba-4.0.0alpha7~424^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=830b31a41aeadf6b688c5f60f114f6137ea13afb;p=thirdparty%2Fsamba.git s3:smbd: we don't need to call message_dispatch() anymore it's event triggered now metze --- diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 78e66e46203..dc038b6b95b 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -407,9 +407,6 @@ static void smbd_deferred_open_timer(struct event_context *ev, TALLOC_CTX *mem_ctx = talloc_tos(); uint8_t *inbuf; - /* TODO: remove this hack */ - message_dispatch(smbd_messaging_context()); - inbuf = (uint8_t *)talloc_memdup(mem_ctx, msg->buf.data, msg->buf.length); if (inbuf == NULL) { @@ -757,13 +754,6 @@ static NTSTATUS smbd_server_connection_loop_once(struct smbd_server_connection * to.tv_sec = SMBD_SELECT_TIMEOUT; to.tv_usec = 0; - /* - * Note that this call must be before processing any SMB - * messages as we need to synchronously process any messages - * we may have sent to ourselves from the previous SMB. - */ - message_dispatch(smbd_messaging_context()); - /* * Setup the select fd sets. */ @@ -849,16 +839,8 @@ static NTSTATUS smbd_server_connection_loop_once(struct smbd_server_connection * return NT_STATUS_RETRY; } - /* - * We've just woken up from a protentially long select sleep. - * Ensure we process local messages as we need to synchronously - * process any messages from other smbd's to avoid file rename race - * conditions. This call is cheap if there are no messages waiting. - * JRA. - */ - message_dispatch(smbd_messaging_context()); - - return NT_STATUS_OK; + /* should not be reached */ + return NT_STATUS_INTERNAL_ERROR; } /* @@ -1874,9 +1856,6 @@ static void smbd_server_connection_read_handler(struct smbd_server_connection *c TALLOC_CTX *mem_ctx = talloc_tos(); NTSTATUS status; - /* TODO: remove this hack */ - message_dispatch(smbd_messaging_context()); - /* TODO: make this completely nonblocking */ status = receive_smb_talloc(mem_ctx, smbd_server_fd(), diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 163d0b81bea..505763014ee 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -573,9 +573,6 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ fd_set r_fds, w_fds; int num; - /* Ensure we respond to PING and DEBUG messages from the main smbd. */ - message_dispatch(smbd_messaging_context()); - if (got_sig_cld) { pid_t pid; int status;