[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-527-ga398deb

Tim Prouty tprouty at samba.org
Wed Mar 18 23:53:44 GMT 2009


The branch, v3-4-test has been updated
       via  a398deb3fe71a6c4c237b1f64dd7bbb8cb6bfa28 (commit)
      from  8e1c29a8be7ea21a6998b77e872bcef90160ee83 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit a398deb3fe71a6c4c237b1f64dd7bbb8cb6bfa28
Author: Tim Prouty <tprouty at samba.org>
Date:   Wed Mar 18 21:49:50 2009 +0000

    s3 onefs: Correctly error out when the read returns EOF
    
    Also add some more debugging.

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

Summary of changes:
 source3/modules/onefs_system.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index b8b059b..46f3826 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -591,8 +591,8 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T offset,
 	 */
 	while (total_rbytes < count) {
 
-		DEBUG(0, ("shallow recvfile, reading %llu\n",
-			  count - total_rbytes));
+		DEBUG(0, ("shallow recvfile (%s), reading %llu\n",
+			  strerror(errno), count - total_rbytes));
 
 		/*
 		 * Read the remaining data into the spill buffer.  recvfile
@@ -603,9 +603,13 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T offset,
 			       spill_buffer + (total_rbytes - total_wbytes),
 			       count - total_rbytes);
 
-		if (ret == -1) {
-			DEBUG(0, ("shallow recvfile read failed: %s\n",
-				  strerror(errno)));
+		if (ret <= 0) {
+			if (ret == 0) {
+				DEBUG(0, ("shallow recvfile read: EOF\n"));
+			} else {
+				DEBUG(0, ("shallow recvfile read failed: %s\n",
+					  strerror(errno)));
+			}
 			/* Socket is dead, so treat as if it were drained. */
 			socket_drained = true;
 			goto out;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list