harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r618638 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
Date Tue, 05 Feb 2008 13:13:44 GMT
Author: hindessm
Date: Tue Feb  5 05:13:43 2008
New Revision: 618638

URL: http://svn.apache.org/viewvc?rev=618638&view=rev
Log:
Add exception check.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c?rev=618638&r1=618637&r2=618638&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
Tue Feb  5 05:13:43 2008
@@ -504,11 +504,15 @@
       message =	(jbyte *)internalBuffer;	
     }
 
-  (*env)->GetByteArrayRegion (env, data, offset, count,	message);
-  
+  (*env)->GetByteArrayRegion (env, data, offset, count, message); 
+  if ((*env)->ExceptionCheck (env)) {
+    goto out;
+  }
+ 
   result = Java_org_apache_harmony_luni_platform_OSNetworkSystem_writeSocketDirectImpl(env,
thisClz,
 	   fileDescriptor, (jlong) message, offset, count);
-    
+
+ out:
   if ((U_8 *)message != internalBuffer)
     {
       hymem_free_memory	(message);



Mime
View raw message