The branch, master has been updated
       via  eb61737 Fix bug #8679 - recvfile code path using splice() on Linux 
leaves data in the pipe on short write
      from  d4e834e lib: Fix NT_STATUS_ALL_SIDS_FILTERED definition

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


- Log -----------------------------------------------------------------
commit eb617374a673bb1189dd9b6bccbf3f1d9fb91010
Author: Jeremy Allison <[email protected]>
Date:   Sat Dec 24 21:12:09 2011 -0800

    Fix bug #8679 - recvfile code path using splice() on Linux leaves data in 
the pipe on short write
    
    Bug found and fix suggested by Andrew Bartlett.
    
    Autobuild-User: Jeremy Allison <[email protected]>
    Autobuild-Date: Sun Dec 25 07:46:38 CET 2011 on sn-devel-104

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

Summary of changes:
 source3/lib/recvfile.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/recvfile.c b/source3/lib/recvfile.c
index 7cbb8a0..5d1c0b2 100644
--- a/source3/lib/recvfile.c
+++ b/source3/lib/recvfile.c
@@ -214,10 +214,9 @@ ssize_t sys_recvfile(int fromfd,
        }
 
  done:
-       if (total_written < count) {
+       if (count) {
                int saved_errno = errno;
-               if (drain_socket(fromfd, count-total_written) !=
-                               count-total_written) {
+               if (drain_socket(fromfd, count) != count) {
                        /* socket is dead. */
                        return -1;
                }


-- 
Samba Shared Repository

Reply via email to