diff options
author | Jeremy Allison <jra@samba.org> | 2001-09-10 23:03:14 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-09-10 23:03:14 +0000 |
commit | 45706091f39573c01312179c48842284dc3e9012 (patch) | |
tree | cd14ed62af0d764e8e63bf84efea67adfb2604ee /source3/smbd | |
parent | 866598e430be5af447f6c7740753e3d2c22dd5e5 (diff) | |
download | samba-45706091f39573c01312179c48842284dc3e9012.tar.gz samba-45706091f39573c01312179c48842284dc3e9012.tar.bz2 samba-45706091f39573c01312179c48842284dc3e9012.zip |
Fix for second logic bug when handing oplock breaks and client messages
simultaneously.
Jeremy.
(This used to be commit 227325b2d63dad55cbcda9608fba676fb6ce5584)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 9f23c7d3be..bf9e6457af 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -207,6 +207,11 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) signals */ if (selrtn == -1 && errno == EINTR) { async_processing(&fds, buffer, buffer_len); + /* + * After async processing we must go and do the select again, as + * the state of the flag in fds for the server file descriptor is + * indeterminate - we may have done I/O on it in the oplock processing. JRA. + */ goto again; } @@ -231,7 +236,12 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) if (oplock_message_waiting(&fds)) { async_processing(&fds, buffer, buffer_len); - if (!FD_ISSET(smbd_server_fd(),&fds)) goto again; + /* + * After async processing we must go and do the select again, as + * the state of the flag in fds for the server file descriptor is + * indeterminate - we may have done I/O on it in the oplock processing. JRA. + */ + goto again; } return receive_smb(smbd_server_fd(), buffer, 0); |