summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-03-31 17:01:27 -0700
committerJeremy Allison <jra@samba.org>2008-03-31 17:01:27 -0700
commit8b04a3350092bf482e4b1c3339ccf95449848bf7 (patch)
tree77e4119f33cc2dd230b8e0aee5cddfb5b0273cff /source3
parent6913f1013456be8938bb71b3d8968170e50933e7 (diff)
downloadsamba-8b04a3350092bf482e4b1c3339ccf95449848bf7.tar.gz
samba-8b04a3350092bf482e4b1c3339ccf95449848bf7.tar.bz2
samba-8b04a3350092bf482e4b1c3339ccf95449848bf7.zip
Ok, final move of this code :-). I think I've found the correct
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. (This used to be commit da2c19c481d0041872b4ce2f5105052077f3d3b8)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 9aa775d0f6..88684315cc 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -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);