Ok, final move of this code :-). I think I've found the correct
authorJeremy Allison <jra@samba.org>
Tue, 1 Apr 2008 00:01:27 +0000 (17:01 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 1 Apr 2008 00:01:27 +0000 (17:01 -0700)
place for it now where it will cause minimal disruption (only
call the extra message_dispatch just before reading the next
smb off the wire).
Jeremy.

source/smbd/process.c

index 9aa775d0f67d6ada2bb2f3266a56abe0b10fbc2e..88684315cc79a71666f08632b389e72f7a3b69a6 100644 (file)
@@ -873,15 +873,6 @@ static NTSTATUS receive_message_or_smb(TALLOC_CTX *mem_ctx, char **buffer,
                return map_nt_error_from_unix(errno);
        }
 
-       /*
-        * 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());
-
        /* Did we timeout ? */
        if (selrtn == 0) {
                return NT_STATUS_IO_TIMEOUT;
@@ -903,6 +894,15 @@ static NTSTATUS receive_message_or_smb(TALLOC_CTX *mem_ctx, char **buffer,
                goto again;
        }
 
+       /*
+        * 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());
+
        status = receive_smb_talloc(mem_ctx, smbd_server_fd(), buffer, 0,
                                    p_unread, p_encrypted, &len);