harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r810468 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Date Wed, 02 Sep 2009 12:03:00 GMT
Author: odeakin
Date: Wed Sep  2 12:03:00 2009
New Revision: 810468

URL: http://svn.apache.org/viewvc?rev=810468&view=rev
Log:
Apply slightly modified patch for HARMONY-6327 ([classlib][nio]FileChannelTest failed on z/OS)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c?rev=810468&r1=810467&r2=810468&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Wed Sep  2 12:03:00 2009
@@ -255,6 +255,8 @@
 #if defined(AIX) || defined(ZOS)
   {
     struct sf_parms parms;
+    int result;
+    int positionBack = Java_org_apache_harmony_luni_platform_OSFileSystem_seekImpl(env, thiz,
fd, 0, 2);
     parms.file_descriptor = (int)fd - FD_BIAS;
     parms.file_offset = (off64_t)offset;
     parms.file_bytes = count;
@@ -262,7 +264,13 @@
     parms.header_length = 0;
     parms.trailer_data = 0;
     parms.trailer_length = 0;
-    return send_file(&socket, &parms, 0);
+    result = send_file(&socket, &parms, 0);
+    if (result == 0) {
+      Java_org_apache_harmony_luni_platform_OSFileSystem_seekImpl(env, thiz, fd, (jlong)positionBack,
1);
+      return count;
+    } else {
+      return result;
+    }
   }
 #else
   /* Value of offset is checked in jint scope (checked in java layer)



Mime
View raw message