svn commit: samba r7040 - in trunk/source/lib: .
jra at samba.org
jra at samba.org
Fri May 27 20:07:35 GMT 2005
Author: jra
Date: 2005-05-27 20:07:33 +0000 (Fri, 27 May 2005)
New Revision: 7040
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7040
Log:
Ensure we always call read_socket_with_timeout() when
timeout > 0. Better solution after much helpful input
from derrell at samba.org. We may eventually change the
read_socket_with_timeout() interface to count down the
timeout value.
Jeremy.
Modified:
trunk/source/lib/util_sock.c
Changeset:
Modified: trunk/source/lib/util_sock.c
===================================================================
--- trunk/source/lib/util_sock.c 2005-05-27 20:07:28 UTC (rev 7039)
+++ trunk/source/lib/util_sock.c 2005-05-27 20:07:33 UTC (rev 7040)
@@ -660,7 +660,12 @@
}
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;
More information about the samba-cvs
mailing list