diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-31 14:01:35 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-31 14:01:35 -0700 |
commit | 133fad90b5f9cef26f9c78cc5b302358c9c4da6a (patch) | |
tree | 62e16ef71d5bb2640a6f0ec87349f2b16145a5a8 /source3/smbd/vfs.c | |
parent | ff82c0a037b7c7ce69d87ab70284acc71df5e1a7 (diff) | |
download | samba-133fad90b5f9cef26f9c78cc5b302358c9c4da6a.tar.gz samba-133fad90b5f9cef26f9c78cc5b302358c9c4da6a.tar.xz samba-133fad90b5f9cef26f9c78cc5b302358c9c4da6a.zip |
Make explicit draining the socket on RECVFILE. Add
capability for large UNIX write if not signing and
recvfile set. Cope with large UNIX write length on
incoming processing. Stevef - we can now test 1-16Mb
writes from CIFFS.
Jeremy.
(This used to be commit 8cf78776b0a44bd026cef3d74eb11cfb415f8303)
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r-- | source3/smbd/vfs.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 21a12ae766a..78939881d35 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -428,15 +428,14 @@ ssize_t vfs_write_data(struct smb_request *req, if (req && req->unread_bytes) { SMB_ASSERT(req->unread_bytes == N); - ret = SMB_VFS_RECVFILE(smbd_server_fd(), + /* VFS_RECVFILE must drain the socket + * before returning. */ + req->unread_bytes = 0; + return SMB_VFS_RECVFILE(smbd_server_fd(), fsp, fsp->fh->fd, (SMB_OFF_T)-1, N); - if (ret != -1) { - req->unread_bytes = 0; - } - return ret; } while (total < N) { @@ -463,15 +462,14 @@ ssize_t vfs_pwrite_data(struct smb_request *req, if (req && req->unread_bytes) { SMB_ASSERT(req->unread_bytes == N); - ret = SMB_VFS_RECVFILE(smbd_server_fd(), + /* VFS_RECVFILE must drain the socket + * before returning. */ + req->unread_bytes = 0; + return SMB_VFS_RECVFILE(smbd_server_fd(), fsp, fsp->fh->fd, offset, N); - if (ret != -1) { - req->unread_bytes = 0; - } - return ret; } while (total < N) { |