1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-24 21:49:29 +03:00

Fix for second logic bug when handing oplock breaks and client messages

simultaneously.
Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 70bd17473a
commit 227325b2d6

View File

@ -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);