From: Jeremy Allison Date: Sat, 29 Mar 2008 00:31:06 +0000 (-0700) Subject: Only allow sendfile on non-stream fsp's. Should fix make test for streams X-Git-Tag: samba-3.3.0pre1~3016 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eef53e9603d4f3d892ffe00b061def5d717ca481;p=thirdparty%2Fsamba.git Only allow sendfile on non-stream fsp's. Should fix make test for streams as sendfile isn't implemented in the streams vfs modules yet. Jeremy. --- diff --git a/source/smbd/reply.c b/source/smbd/reply.c index bababfecacd..eb8e5ff9153 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2656,7 +2656,7 @@ void send_file_readbraw(connection_struct *conn, * reply_readbraw has already checked the length. */ - if ( (chain_size == 0) && (nread > 0) && + if ( (chain_size == 0) && (nread > 0) && (fsp->base_fsp == NULL) (fsp->wcp == NULL) && lp_use_sendfile(SNUM(conn)) ) { char header[4]; DATA_BLOB header_blob; @@ -3131,7 +3131,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req, */ if ((chain_size == 0) && (CVAL(req->inbuf,smb_vwv0) == 0xFF) && - !is_encrypted_packet(req->inbuf) && + !is_encrypted_packet(req->inbuf) && (fsp->base_fsp == NULL) && lp_use_sendfile(SNUM(conn)) && (fsp->wcp == NULL) ) { uint8 headerbuf[smb_size + 12 * 2]; DATA_BLOB header;