[SCM] Samba Shared Repository - branch master updated - da2dd1406f57461af20df2df3586e48be60b3af2

Jeremy Allison jra at samba.org
Tue Jan 13 23:37:36 GMT 2009


The branch, master has been updated
       via  da2dd1406f57461af20df2df3586e48be60b3af2 (commit)
      from  0f450623c5e73b941ced136ba7160bf6554a21ce (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit da2dd1406f57461af20df2df3586e48be60b3af2
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 13 15:36:09 2009 -0800

    Only call sendfile_short_read() if we need it.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/reply.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index c8b8ec5..d770496 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2785,7 +2785,9 @@ void send_file_readbraw(connection_struct *conn,
 		}
 
 		/* Deal with possible short send. */
-		sendfile_short_send(fsp, sendfile_read, 4, nread);
+		if (sendfile_read != 4+nread) {
+			sendfile_short_send(fsp, sendfile_read, 4, nread);
+		}
 		return;
 	}
 #endif
@@ -3278,7 +3280,9 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
 			fsp->fnum, (int)smb_maxcnt, (int)nread ) );
 
 		/* Deal with possible short send. */
-		sendfile_short_send(fsp, nread, sizeof(headerbuf), smb_maxcnt);
+		if (nread != smb_maxcnt + sizeof(headerbuf)) {
+			sendfile_short_send(fsp, nread, sizeof(headerbuf), smb_maxcnt);
+		}
 
 		/* No outbuf here means successful sendfile. */
 		TALLOC_FREE(req->outbuf);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list