diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-23 16:42:31 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-23 17:09:10 +0100 |
commit | a925a53f61ebdc6b4386b7c0853f2f87cbe2e166 (patch) | |
tree | 115ee6eb8c3ad08b2ef877ccda6cac49d351374c /source3/smbd | |
parent | 587cf54c61c9f1f7bcae431a82035fd942716c32 (diff) | |
download | samba-a925a53f61ebdc6b4386b7c0853f2f87cbe2e166.tar.gz samba-a925a53f61ebdc6b4386b7c0853f2f87cbe2e166.tar.bz2 samba-a925a53f61ebdc6b4386b7c0853f2f87cbe2e166.zip |
read_socket_with_timeout has timeout=0 handling
(This used to be commit 7101026061c470ed962267b43ac0aa67cc761a64)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 6fd4d17d88..d961f98cc0 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -155,16 +155,8 @@ static ssize_t read_packet_remainder(int fd, return len; } - if (timeout > 0) { - ret = read_socket_with_timeout(fd, - buffer, - len, - len, - timeout, - get_srv_read_error()); - } else { - ret = read_data(fd, buffer, len, get_srv_read_error()); - } + ret = read_socket_with_timeout(fd, buffer, len, len, timeout, + get_srv_read_error()); if (ret != len) { cond_set_smb_read_error(get_srv_read_error(), @@ -206,19 +198,10 @@ static ssize_t receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx, memcpy(writeX_header, lenbuf, sizeof(lenbuf)); - if (timeout > 0) { - ret = read_socket_with_timeout(fd, - writeX_header + 4, - STANDARD_WRITE_AND_X_HEADER_SIZE, - STANDARD_WRITE_AND_X_HEADER_SIZE, - timeout, - get_srv_read_error()); - } else { - ret = read_data(fd, - writeX_header+4, - STANDARD_WRITE_AND_X_HEADER_SIZE, - get_srv_read_error()); - } + ret = read_socket_with_timeout(fd, writeX_header + 4, + STANDARD_WRITE_AND_X_HEADER_SIZE, + STANDARD_WRITE_AND_X_HEADER_SIZE, + timeout, get_srv_read_error()); if (ret != STANDARD_WRITE_AND_X_HEADER_SIZE) { cond_set_smb_read_error(get_srv_read_error(), |