svn commit: samba r7039 - in branches/SAMBA_3_0/source/lib: .

jra at samba.org jra at samba.org
Fri May 27 20:07:29 GMT 2005


Author: jra
Date: 2005-05-27 20:07:28 +0000 (Fri, 27 May 2005)
New Revision: 7039

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7039

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:
   branches/SAMBA_3_0/source/lib/util_sock.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_sock.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_sock.c	2005-05-27 19:02:30 UTC (rev 7038)
+++ branches/SAMBA_3_0/source/lib/util_sock.c	2005-05-27 20:07:28 UTC (rev 7039)
@@ -597,7 +597,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