diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-08-26 14:06:42 +1000 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-26 14:39:43 +0200 |
commit | 39697d57451d05585063dc05c4fd6c5ae646a0a5 (patch) | |
tree | 9026da9a2c6c7048348a81ff769dd075c3e83b64 /source3 | |
parent | 563a7ccdd9d23ffbd3195c8def82cd4d8d4cb0dc (diff) | |
download | samba-39697d57451d05585063dc05c4fd6c5ae646a0a5.tar.gz samba-39697d57451d05585063dc05c4fd6c5ae646a0a5.tar.bz2 samba-39697d57451d05585063dc05c4fd6c5ae646a0a5.zip |
EINVAL is also a valid error return, meaning "this filesystem
cannot do sendfile for this file"
(This used to be commit 737f664604b28f230be63bfc2f3d516fd9eb1c63)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/reply.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index b3d691fbe7..06aa835cb0 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3198,8 +3198,9 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req, setup_readX_header((char *)headerbuf, smb_maxcnt); if ((nread = SMB_VFS_SENDFILE(smbd_server_fd(), fsp, &header, startpos, smb_maxcnt)) == -1) { - /* Returning ENOSYS means no data at all was sent. Do this as a normal read. */ - if (errno == ENOSYS) { + /* Returning ENOSYS or EINVAL means no data at all was sent. + Do this as a normal read. */ + if (errno == ENOSYS || errno == EINVAL) { goto normal_read; } |