[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Fri Jun 8 10:09:03 MDT 2012


The branch, master has been updated
       via  41d830e s3:smbd: remove unnecessary variable readret from read_file()
       via  eb750d5 s3:smbd: remove ancient DMF_FIX from read_file().
      from  80d3702 build: do not run fsrvp tests as part of selftest

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


- Log -----------------------------------------------------------------
commit 41d830ea4fb8bf7cb20e08607ba9db9f53c03880
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 8 16:06:24 2012 +0200

    s3:smbd: remove unnecessary variable readret from read_file()
    
    Pair-Programmed-With: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Fri Jun  8 18:08:09 CEST 2012 on sn-devel-104

commit eb750d54589542d9e6d9d48ff3bed1890cee7050
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 8 14:23:09 2012 +0200

    s3:smbd: remove ancient DMF_FIX from read_file().
    
    Pair-Programmed-With: Volker Lendecke <vl at samba.org>

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

Summary of changes:
 source3/smbd/fileio.c |   25 +++----------------------
 1 files changed, 3 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index ab505f4..a14be78 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -64,7 +64,7 @@ static bool read_from_write_cache(files_struct *fsp,char *data,off_t pos,size_t
 
 ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n)
 {
-	ssize_t ret=0,readret;
+	ssize_t ret = 0;
 
 	/* you can't read from print files */
 	if (fsp->print_file) {
@@ -87,30 +87,11 @@ ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n)
 	fsp->fh->pos = pos;
 
 	if (n > 0) {
-#ifdef DMF_FIX
-		int numretries = 3;
-tryagain:
-		readret = SMB_VFS_PREAD(fsp,data,n,pos);
-
-		if (readret == -1) {
-			if ((errno == EAGAIN) && numretries) {
-				DEBUG(3,("read_file EAGAIN retry in 10 seconds\n"));
-				(void)sleep(10);
-				--numretries;
-				goto tryagain;
-			}
-			return -1;
-		}
-#else /* NO DMF fix. */
-		readret = SMB_VFS_PREAD(fsp,data,n,pos);
+		ret = SMB_VFS_PREAD(fsp,data,n,pos);
 
-		if (readret == -1) {
+		if (ret == -1) {
 			return -1;
 		}
-#endif
-		if (readret > 0) {
-			ret += readret;
-		}
 	}
 
 	DEBUG(10,("read_file (%s): pos = %.0f, size = %lu, returned %lu\n",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list