diff options
author | Jeremy Allison <jra@samba.org> | 2001-09-05 22:45:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-09-05 22:45:54 +0000 |
commit | 49a21ad5ea39d77ba07b6a1ff778177bf10df4ea (patch) | |
tree | ecdb0086e8dff539e46d892081667d41827f4b1b /source/smbd/process.c | |
parent | c7d1b06f31550289a864fd09165d3545f207b80e (diff) | |
download | samba-49a21ad5ea39d77ba07b6a1ff778177bf10df4ea.tar.gz samba-49a21ad5ea39d77ba07b6a1ff778177bf10df4ea.tar.xz samba-49a21ad5ea39d77ba07b6a1ff778177bf10df4ea.zip |
Fix I think for the fcntl spinning problem. Re-prioritize so
that oplock break messages get priority over incoming client messages.
Jeremy.
Diffstat (limited to 'source/smbd/process.c')
-rw-r--r-- | source/smbd/process.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/smbd/process.c b/source/smbd/process.c index a304b1e4a25..e67d8728b1a 100644 --- a/source/smbd/process.c +++ b/source/smbd/process.c @@ -223,7 +223,13 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) return False; } - if (!FD_ISSET(smbd_server_fd(),&fds) || selrtn > 1) { + /* + * Ensure we process oplock break messages by preference. + * This is IMPORTANT ! Otherwise we can starve other processes + * sending us an oplock break message. JRA. + */ + + if (oplock_message_waiting(&fds)) { async_processing(&fds, buffer, buffer_len); if (!FD_ISSET(smbd_server_fd(),&fds)) goto again; } |