summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-12 09:29:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:04 -0500
commit7a915ec3a61b74b07564d93112a3fbc87970c48d (patch)
tree9cbb7ea9764957dc79d607ae490c1f1cf947e5c6 /source3
parent93433501021bf6df00df3135992ed021385cfce6 (diff)
downloadsamba-7a915ec3a61b74b07564d93112a3fbc87970c48d.tar.gz
samba-7a915ec3a61b74b07564d93112a3fbc87970c48d.tar.bz2
samba-7a915ec3a61b74b07564d93112a3fbc87970c48d.zip
r20700: In the main processing loop we select() on the fam socket. If it fires, it
might be possible that we hang in the receive_smb() although that socket is not the reason for the select() to return. This immediately reacts to the fam socket to become readable, and goes into the select loop again. This fixes delays in files showing up in Windows. Jeremy, James please review this and merge to 3_0_24 if appropriate. Thanks, Volker (This used to be commit c846153b2ed2f9aca82491888e391ccbe239e88a)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 28c2cd65dd..ecb33453c5 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -514,6 +514,19 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout)
*/
goto again;
}
+
+ if ((change_notify_fd() >= 0) && FD_ISSET(change_notify_fd(), &fds)) {
+
+ process_pending_change_notify_queue((time_t)0);
+
+ /*
+ * Same comment as for oplock processing applies here. We
+ * might have done I/O on the client socket.
+ */
+
+ goto again;
+ }
+
return receive_smb(smbd_server_fd(), buffer, 0);
}