diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-15 15:23:47 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-17 22:44:03 +0200 |
commit | 9671547d17fa8152dbad127fde2a963b2ba834a0 (patch) | |
tree | d7c43c162b321f912172c3640d5b5b9c85630805 /source3/smbd | |
parent | 786c41b0954b541518d1096019e1ce7ca11e5e98 (diff) | |
download | samba-9671547d17fa8152dbad127fde2a963b2ba834a0.tar.gz samba-9671547d17fa8152dbad127fde2a963b2ba834a0.tar.bz2 samba-9671547d17fa8152dbad127fde2a963b2ba834a0.zip |
s3: Lift smbd_server_fd() from read_fd_with_timeout()
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index c44d86a6b8..8c781c8955 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -206,11 +206,21 @@ static bool valid_packet_size(size_t len) static NTSTATUS read_packet_remainder(int fd, char *buffer, unsigned int timeout, ssize_t len) { + NTSTATUS status; + if (len <= 0) { return NT_STATUS_OK; } - return read_fd_with_timeout(fd, buffer, len, len, timeout, NULL); + status = read_fd_with_timeout(fd, buffer, len, len, timeout, NULL); + if (!NT_STATUS_IS_OK(status)) { + char addr[INET6_ADDRSTRLEN]; + DEBUG(0, ("read_fd_with_timeout failed for client %s read " + "error = %s.\n", + get_peer_addr(fd, addr, sizeof(addr)), + nt_errstr(status))); + } + return status; } /**************************************************************************** @@ -251,6 +261,11 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx, timeout, NULL); if (!NT_STATUS_IS_OK(status)) { + char addr[INET6_ADDRSTRLEN]; + DEBUG(0, ("read_fd_with_timeout failed for client %s read " + "error = %s.\n", + get_peer_addr(fd, addr, sizeof(addr)), + nt_errstr(status))); return status; } |