aalvarez pushed to dpm-dsi (el5). "Patch for proper EOF handling"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 7 09:58:39 UTC 2015


>From 11ceb6705fc5f126dc55b13694fd3714ac033c8f Mon Sep 17 00:00:00 2001
From: aalvarez <aalvarez at cern.ch>
Date: Thu, 15 May 2014 08:47:11 +0200
Subject: Patch for proper EOF handling


diff --git a/dpm-dsi-eof.patch b/dpm-dsi-eof.patch
new file mode 100644
index 0000000..0555c40
--- /dev/null
+++ b/dpm-dsi-eof.patch
@@ -0,0 +1,17 @@
+Index: src/dmlite_gridftp.c
+===================================================================
+--- src/dmlite_gridftp.c	(.../dpm-dsi_1_9_3c)	(révision 10416)
++++ src/dmlite_gridftp.c	(.../dpm-dsi_1_9_3d)	(révision 10416)
+@@ -825,9 +825,9 @@
+ 
+ 	/* Perform the actual read operation */
+ 	bytes_read = dmlite_fread(dmlite_handle_obj->fd, buffer, bytes_length);
+-	/* Check for end of file reached (0 bytes read) */
+-
+-	if (bytes_read < 0) { /* Check for errors too */
++	if (bytes_read == 0) /* EOF */
++		goto done;
++	if (bytes_read < 0) { /* Check for errors */
+ 		dmlite_handle_obj->cur_result = posix_error2gfs_result(_gfs_name, dmlite_handle_obj,
+ 				EFAULT, "failed read");
+ 		goto done;
diff --git a/dpm-dsi.spec b/dpm-dsi.spec
index eb6edf7..643db4b 100644
--- a/dpm-dsi.spec
+++ b/dpm-dsi.spec
@@ -1,7 +1,7 @@
 Name:		dpm-dsi
 Summary:	Disk Pool Manager (DPM) plugin for the Globus GridFTP server
 Version:	1.9.3
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	ASL 2.0
 Group:		Applications/Internet
 URL:		https://svnweb.cern.ch/trac/lcgdm/wiki/Dpm
@@ -10,6 +10,8 @@ URL:		https://svnweb.cern.ch/trac/lcgdm/wiki/Dpm
 # svn export http://svn.cern.ch/guest/lcgdm/dpm-dsi/tags/dpm-dsi_1_9_3c dpm-dsi-1.9.3
 # tar -czvf dpm-dsi-1.9.3.tar.gz dpm-dsi-1.9.3
 Source0:	%{name}-%{version}.tar.gz
+# https://its.cern.ch/jira/browse/LCGDM-1408
+Patch0:   dpm-dsi-eof.patch
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:		cmake
@@ -44,6 +46,7 @@ required to expose the data using this protocol.
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p0
 
 %build
 %cmake . -DCMAKE_INSTALL_PREFIX=/
@@ -85,6 +88,9 @@ if [ $1 -ge 1 ]; then
 fi
 
 %changelog
+* Thu May 15 2014 Alejandro Alvarez <aalvarez at cern.ch> - 1.9.3-2
+- Patch for proper EOF handling
+
 * Wed Mar 12 2014 Alejandro Alvarez <aalvarez at cern.ch> - 1.9.3-1
 - Update for new upstream release
 - Fixed bogus date
diff --git a/sources b/sources
index cc2b8cf..64c65fe 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-9ae3915b47f7b19907a55f60569e1168  dpm-dsi-1.9.0.tar.gz
 b74bbbb28efb8bbdb1d173fa008e6bad  dpm-dsi-1.9.3.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/dpm-dsi.git/commit/?h=el5&id=11ceb6705fc5f126dc55b13694fd3714ac033c8f


More information about the scm-commits mailing list