harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r574271 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni: unix/OSNetworkSystemLinux.c windows/OSNetworkSystemWin32.c
Date Mon, 10 Sep 2007 14:56:27 GMT
Author: tellison
Date: Mon Sep 10 07:56:27 2007
New Revision: 574271

URL: http://svn.apache.org/viewvc?rev=574271&view=rev
Log:
Fix for HARMONY-4770 ([classlib][luni] OSNetworkSystemLinux.c: selectImpl(), local ref removal)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c?rev=574271&r1=574270&r2=574271&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
Mon Sep 10 07:56:27 2007
@@ -208,6 +208,7 @@
   for (val=0; val<countReadC; val++) {
 	  gotFD	= (*env)->GetObjectArrayElement(env, readFDArray, val);
 	  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, gotFD);
+      (*env)->DeleteLocalRef(env, gotFD);
 
       my_pollfds[val].fd = hysocketP->sock;
       my_pollfds[val].events = POLLIN | POLLPRI;
@@ -217,6 +218,7 @@
   for (val=0; val<countWriteC; val++) {
 	  gotFD	= (*env)->GetObjectArrayElement(env, writeFDArray, val);
 	  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, gotFD);
+      (*env)->DeleteLocalRef(env, gotFD);
 
       my_pollfds[countReadC + val].fd = hysocketP->sock;
       my_pollfds[countReadC + val].events = POLLOUT;
@@ -398,4 +400,5 @@
 	free(localAddr);
 	return channel_object;
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c?rev=574271&r1=574270&r2=574271&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
Mon Sep 10 07:56:27 2007
@@ -59,6 +59,8 @@
   for (val = 0; val<countReadC; val++){
 	  gotFD	= (*env)->GetObjectArrayElement(env,readFDArray,val);
 	  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
+      (*env)->DeleteLocalRef(env, gotFD);
+
 	  if (!hysock_socketIsValid (hysocketP)){
       		continue;
     	  }
@@ -78,6 +80,8 @@
   for (val = 0; val<countWriteC; val++){
 	  gotFD	= (*env)->GetObjectArrayElement(env,writeFDArray,val);
 	  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
+      (*env)->DeleteLocalRef(env, gotFD);
+
 	  if (!hysock_socketIsValid (hysocketP)){
       		continue;
     	  }
@@ -119,6 +123,8 @@
 	  for (val=0;val<countReadC;val++){
 		gotFD =	(*env)->GetObjectArrayElement(env,readFDArray,val);
 		hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
+        (*env)->DeleteLocalRef(env, gotFD);
+
 		if (!hysock_socketIsValid (hysocketP)){
       			continue;
     	  	}
@@ -141,6 +147,8 @@
 	  for (val=0;val<countWriteC;val++){
 		gotFD =	(*env)->GetObjectArrayElement(env,writeFDArray,val);
 		hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
+        (*env)->DeleteLocalRef(env, gotFD);
+
 		if (!hysock_socketIsValid (hysocketP)){
       			continue;
     	  	}



Mime
View raw message