summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-23 17:37:59 +0100
committerVolker Lendecke <vl@samba.org>2008-01-24 09:41:22 +0100
commit9344628bef74ac759197601dc5dd44514b836e3e (patch)
treed1088426f0bf4cc4238436d0e7f0f3792d29e48f /source3
parent2e7e3095a65f6c76a2b68a82b5a0f50ffab50614 (diff)
downloadsamba-9344628bef74ac759197601dc5dd44514b836e3e.tar.gz
samba-9344628bef74ac759197601dc5dd44514b836e3e.tar.bz2
samba-9344628bef74ac759197601dc5dd44514b836e3e.zip
More read_data -> read_socket_with_timeout
(This used to be commit f1d7de462cf0f64648a3a1fc6f0c64a7bbdb3c2a)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_sock.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index fb8f41513b..1a7cc02229 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1126,12 +1126,7 @@ ssize_t read_smb_length_return_keepalive(int fd,
bool ok = false;
while (!ok) {
- if (timeout > 0) {
- ok = (read_socket_with_timeout(fd,inbuf,4,4,
- timeout,pre) == 4);
- } else {
- ok = (read_data(fd,inbuf,4,pre) == 4);
- }
+ ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout,pre) == 4);
if (!ok) {
return -1;
}
@@ -1237,16 +1232,8 @@ ssize_t receive_smb_raw(int fd,
len = MIN(len,maxlen);
}
- if (timeout > 0) {
- ret = read_socket_with_timeout(fd,
- buffer+4,
- len,
- len,
- timeout,
- pre);
- } else {
- ret = read_data(fd,buffer+4,len,pre);
- }
+ ret = read_socket_with_timeout(fd, buffer+4, len, len, timeout,
+ pre);
if (ret != len) {
cond_set_smb_read_error(pre,SMB_READ_ERROR);