summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-15 08:56:18 +0200
committerVolker Lendecke <vl@samba.org>2010-08-16 22:39:23 +0200
commit36cfc1d145d003005111612c67474fac5b9f442e (patch)
tree0220a135b2b7d78998736fff12d0682158aabed2
parent209b3aee1c265a3d81ede4242963c043288289bb (diff)
downloadsamba-36cfc1d145d003005111612c67474fac5b9f442e.tar.gz
samba-36cfc1d145d003005111612c67474fac5b9f442e.tar.bz2
samba-36cfc1d145d003005111612c67474fac5b9f442e.zip
s3: Remove smbd_server_fd() from send_file_readX
-rw-r--r--source3/smbd/reply.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 761a6b490e..19d9d53485 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3479,7 +3479,9 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
construct_reply_common_req(req, (char *)headerbuf);
setup_readX_header(req, (char *)headerbuf, smb_maxcnt);
- if ((nread = SMB_VFS_SENDFILE(smbd_server_fd(), fsp, &header, startpos, smb_maxcnt)) == -1) {
+ nread = SMB_VFS_SENDFILE(req->sconn->sock, fsp, &header,
+ startpos, smb_maxcnt);
+ if (nread == -1) {
/* Returning ENOSYS means no data at all was sent.
Do this as a normal read. */
if (errno == ENOSYS) {
@@ -3554,7 +3556,7 @@ normal_read:
setup_readX_header(req, (char *)headerbuf, smb_maxcnt);
/* Send out the header. */
- if (write_data(smbd_server_fd(), (char *)headerbuf,
+ if (write_data(req->sconn->sock, (char *)headerbuf,
sizeof(headerbuf)) != sizeof(headerbuf)) {
DEBUG(0,("send_file_readX: write_data failed for file "
"%s (%s). Terminating\n", fsp_str_dbg(fsp),