1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r7039: Ensure we always call read_socket_with_timeout() when

timeout > 0. Better solution after much helpful input
from derrell@samba.org. We may eventually change the
read_socket_with_timeout() interface to count down the
timeout value.
Jeremy.
This commit is contained in:
Jeremy Allison 2005-05-27 20:07:28 +00:00 committed by Gerald (Jerry) Carter
parent c72182c1e2
commit 09c9a62aa5

View File

@ -597,7 +597,12 @@ BOOL receive_smb_raw(int fd, char *buffer, unsigned int timeout)
}
if(len > 0) {
ret = read_socket_data(fd,buffer+4,len);
if (timeout > 0) {
ret = read_socket_with_timeout(fd,buffer+4,len,len,timeout);
} else {
ret = read_socket_data(fd,buffer+4,len);
}
if (ret != len) {
if (smb_read_error == 0)
smb_read_error = READ_ERROR;