harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r548725 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni: shared/OSNetworkSystem.c unix/OSNetworkSystemLinux.c
Date Tue, 19 Jun 2007 13:45:24 GMT
Author: ayza
Date: Tue Jun 19 06:45:22 2007
New Revision: 548725

URL: http://svn.apache.org/viewvc?view=rev&rev=548725
Log:
Committing slightly reworked version of second patch from HARMONY-4077 ([classlib][portlib]
socket related functions incorrectly work in socket > FD_SETSIZE)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.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?view=diff&rev=548725&r1=548724&r2=548725
==============================================================================
--- 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 Jun 19 06:45:22 2007
@@ -450,7 +450,7 @@
   /*----------------the older form,nearly the same with below------------
   //result = pollSelectRead (env, fileDescriptor, timeout, TRUE);
   */
-  result = selectRead (env,hysocketP, timeout, FALSE);	    
+  result = selectRead (env, hysocketP, timeout * 1000, FALSE);	    
   if (0	>= result)
 	return (jint) 0;
 

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?view=diff&rev=548725&r1=548724&r2=548725
==============================================================================
--- 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
Tue Jun 19 06:45:22 2007
@@ -43,12 +43,14 @@
 selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept){
   PORT_ACCESS_FROM_ENV (env);
   I_32 result = 0;
+  I_32 timeout;
   struct pollfd my_pollfd;
 
+  timeout = uSecTime >= 0 ? TO_MILLIS(0, uSecTime) : -1;
   my_pollfd.fd = hysocketP->sock;
   my_pollfd.events = POLLIN | POLLPRI;
   my_pollfd.revents = 0;
-  result = poll (&my_pollfd, 1, TO_MILLIS(0, uSecTime));
+  result = poll (&my_pollfd, 1, timeout);
   
   return result;
 }



Mime
View raw message