harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r389887 [2/2] - in /incubator/harmony/enhanced/classlib/trunk: modules/luni/src/main/java/java/net/ native-src/linux.IA32/luni/ native-src/shared/luni/ native-src/win.IA32/luni/
Date Wed, 29 Mar 2006 20:58:56 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c?rev=389887&r1=389886&r2=389887&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c Wed
Mar 29 12:58:53 2006
@@ -22,21 +22,156 @@
 #include "socket.h"
 #include "jclglob.h"
 
+void setSocketImplPort (JNIEnv * env, jobject socketImpl, U_16 hPort);
+void setSocketImplAddress (JNIEnv * env, jobject socketImpl,
+	 jobject anInetAddress);
+void updateSocket (JNIEnv * env, hysockaddr_t sockaddrP, hysocket_t socketNew,
+       jobject socketImpl, jobject fileDescriptorSocketImpl);
 void * getConnectContext(JNIEnv	*env,jobject longclass);
 void setConnectContext(JNIEnv *env,jobject longclass,U_8 * context);
 
-int selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime,
-                BOOLEAN accept);
-void updateSocket (JNIEnv * env, hysockaddr_t sockaddrP, hysocket_t socketNew,
-                   jobject socketImpl, jobject fileDescriptorSocketImpl);
+void setDatagramPacketAddress (JNIEnv *	env, jobject datagramPacket,
+	     jobject anInetAddress);
+void setDatagramPacketPort (JNIEnv * env, jobject datagramPacket, U_16 hPort);
 void updateAddress (JNIEnv * env, hysockaddr_t sockaddrP,
 	jobject	senderAddress);	
 void updatePacket (JNIEnv * env, hysockaddr_t sockaddrP,
        jobject datagramPacket, I_32 bytesRead);	
 void setDatagramPacketLength (JNIEnv * env, jobject datagramPacket,
 	    I_32 length);
-jfieldID getJavaNetInetAddressIpaddress(JNIEnv * env);
-void setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd, void *value);
+int 
+selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept);
+
+/**
+ * A helper method, to set the remote address into the DatagramPacket.
+ *
+ * @param env		pointer	to the JNI library
+ * @param datagramPacket  pointer to the java DatagramPacket object to update
+ * @param anInetAddress	  pointer to the java InetAddress to update the	packet with
+ *
+ */
+
+void
+setDatagramPacketAddress (JNIEnv * env,	jobject	datagramPacket,	
+	jobject	anInetAddress)
+{
+  /*----------------------former cache get/set ----------------------------
+  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_DatagramPacket_address);
+  */
+  jfieldID fid = getJavaNetDatagramPacketAddress(env);
+  (*env)->SetObjectField (env, datagramPacket, fid, anInetAddress);
+}
+
+/**
+ * A helper method, to set the remote port into	the java DatagramPacket.
+ *
+ * @param env		pointer	to the JNI library
+ * @param datagramPacket  pointer to the java DatagramPacket object to update
+ * @param hPort		the port value to update the packet with, in host order	
+ */
+
+void
+setDatagramPacketPort (JNIEnv *	env, jobject datagramPacket, U_16 hPort)
+{
+  /*----------------------former cache get/set ----------------------------
+  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_DatagramPacket_port);
+  */
+  jfieldID fid = getJavaNetDatagramPacketPort(env);
+  (*env)->SetIntField (env, datagramPacket, fid, hPort);
+}
+
+/**
+ * A helper method, to set the data length into	a java DatagramPacket.
+ *
+ * @param env		pointer	to the JNI library
+ * @param datagramPacket  pointer to the java DatagramPacket object to update
+ * @param length	  the length value to update the packet	with
+ */
+
+void
+setDatagramPacketLength	(JNIEnv	* env, jobject datagramPacket, I_32 length)
+{
+  /*----------------------former cache get/set ----------------------------
+  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_DatagramPacket_length);
+  */
+  jfieldID fid = getJavaNetDatagramPacketLength(env);
+  (*env)->SetIntField (env, datagramPacket, fid, length);
+}
+
+/**
+ * A helper method, to update the java DatagramPacket argument.	 Used after receiving a	datagram
packet, 
+ * to update the DatagramPacket	with the network address and port of the sending machine.
+ *
+ * @param env		pointer	to the JNI library
+ * @param sockaddrP	pointer	to the hysockaddr struct with the sending host address &
port
+ * @param datagramPacket  pointer to the java DatagramPacket object to update
+ * @param bytesRead	the bytes read value to	update the packet with
+ */
+
+void
+updatePacket (JNIEnv * env, hysockaddr_t sockaddrP, jobject datagramPacket,
+	I_32 bytesRead)	
+{
+  PORT_ACCESS_FROM_ENV (env);
+  jobject anInetAddress;
+  U_16 nPort;
+  U_32 length;
+  U_32 scope_id	= 0;
+  jbyte	byte_array[HYSOCK_INADDR6_LEN];	
+  hysock_sockaddr_address6 (sockaddrP, (U_8 *) byte_array, &length,
+	  &scope_id);
+
+  nPort	= hysock_sockaddr_port (sockaddrP);
+  anInetAddress	=
+    newJavaNetInetAddressGenericB (env,	byte_array, length, scope_id);
+
+  setDatagramPacketAddress (env, datagramPacket, anInetAddress);
+  setDatagramPacketPort	(env, datagramPacket, hysock_ntohs (nPort));
+  setDatagramPacketLength (env,	datagramPacket,	bytesRead);
+}
+
+/**
+ * A helper method, to set address of the java InetAddress argument.
+ *
+ * @param env		pointer	to the JNI library
+ * @param sockaddrP	pointer	to the hysockaddr struct containing the	network	address	
+ * @param senderAddress	pointer	to the java InetAddress	object to update
+ */
+
+void
+updateAddress (JNIEnv *	env, hysockaddr_t sockaddrP, jobject senderAddress)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  jbyte	ipv4Addr[16];
+  U_32 length;
+  U_32 scope_id	= 0;
+  hysock_sockaddr_address6 (sockaddrP, (U_8 *) ipv4Addr, &length, &scope_id);
+  /*-------------- Here is the cache get/set,remain for next change  ---------------
+  
+  //(*env)->SetObjectField (env, senderAddress,	
+  //	  JCL_CACHE_GET	(env,
+  //	     FID_java_net_InetAddress_address),	
+  //	  newJavaByteArray (env, ipv4Addr, length));
+  */
+  (*env)->SetObjectField (env, senderAddress,
+	getJavaNetInetAddressIpaddress(env),
+	newJavaByteArray (env, ipv4Addr, length));
+  if (jcl_supports_ipv6	(env) && (scope_id != 0))
+    {
+      jclass tempClass = getJavaNetInetAddressClass(env);
+      jfieldID fid = NULL;
+
+      fid = (*env)->GetFieldID (env, tempClass,	"scope_id", "I");
+      if ((*env)->ExceptionCheck (env))	
+	{
+	  (*env)->ExceptionClear (env);	
+	}
+      else
+	{
+	  (*env)->SetIntField (env, senderAddress, fid,	scope_id);
+	}
+    }
+}
 
 /**
  * A helper method, to set the connect context to a Long object.
@@ -68,6 +203,77 @@
   return  (void	*) ((*env)->GetLongField (env, longclass, descriptorFID));
 };
 
+/**
+ * A helper method, to set the remote address into the socketImpl.
+ *
+ * @param env		pointer	to the JNI library
+ * @param socketImpl	  pointer to the java SocketImpl object	to update
+ * @param anInetAddress	  pointer to the java InetAddress to update the	socket with
+ */
+
+void
+setSocketImplAddress (JNIEnv * env, jobject socketImpl,	jobject	anInetAddress)
+{
+  /*-------------- Here is the cache get/set,remain for next change  ---------------
+  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_SocketImpl_address);
+  */
+  jfieldID fid = getJavaNetSocketImplAddress(env);
+  (*env)->SetObjectField (env, socketImpl, fid,	anInetAddress);	
+}
+
+/**
+ * A helper method, to set the remote port into	the socketImpl.	
+ *
+ * @param env	      pointer to the JNI library
+ * @param socketImpl	pointer	to the java SocketImpl object to update	
+ * @param hPort	      the port number, in host order, to update	the socket with	
+ */
+
+void
+setSocketImplPort (JNIEnv * env, jobject socketImpl, U_16 hPort)
+{
+  /*----------------------former cache get/set ---------------
+  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_SocketImpl_port);
+  */
+  jfieldID fid = getJavaNetSocketImplPort( env);
+  (*env)->SetIntField (env, socketImpl,	fid, hPort);
+}
+
+/**
+ * A helper method, to update the java SocketImpl argument.  Used after	connecting, to 'link'
the 
+ * system socket with the java socketImpl and update the address/port fields with the values
+ * corresponding to the	remote machine.	
+ *
+ * @param env			pointer	to the JNI library
+ * @param sockaddrP		pointer	to the hysockaddr struct with the remote host address &
port
+ * @param socketNew		pointer	to the new hysocket
+ * @param socketImpl		  pointer to the new java (connected) socket
+ * @param fileDescriptorSocketImpl    pointer to the java file descriptor of the socketImpl
+ */
+
+void
+updateSocket (JNIEnv * env,
+	hysockaddr_t sockaddrP,	hysocket_t socketNew,
+	jobject	socketImpl, jobject fileDescriptorSocketImpl)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  U_8 nipAddress[HYSOCK_INADDR6_LEN];
+  U_32 length;
+  jobject anInetAddress;
+  U_16 nPort;
+  U_32 scope_id	= 0;
+
+  hysock_sockaddr_address6 (sockaddrP, nipAddress, &length, &scope_id);	
+  nPort	= hysock_sockaddr_port (sockaddrP);
+  anInetAddress	=
+    newJavaNetInetAddressGenericB (env,	nipAddress, length, scope_id);
+
+  setJavaIoFileDescriptorContents (env,	fileDescriptorSocketImpl,
+	      socketNew);
+  setSocketImplAddress (env, socketImpl, anInetAddress);
+  setSocketImplPort (env, socketImpl, hysock_ntohs (nPort));
+}
+
 /*----------------------former cache get/set ------------------------------------
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
@@ -185,7 +391,7 @@
 #define	INTERNAL_RECEIVE_BUFFER_MAX 2048
   U_8 internalBuffer[INTERNAL_RECEIVE_BUFFER_MAX];
 
-  hysocketP =getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  hysocketP =getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
 
   /*----------------the older form,nearly the same with below------------
   //result = pollSelectRead (env, fileDescriptor, timeout, TRUE);
@@ -284,7 +490,7 @@
   while	(sent <	count)
     {
       socketP =	
-	getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+	getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
 	  if (message != internalBuffer)
@@ -338,7 +544,7 @@
 	PORT_ACCESS_FROM_ENV (env);
 	hysocket_t socketP;
 	int result;		
-	socketP	=getJavaIoFileDescriptorContentsAsPointer (env, afd);
+	socketP	=getJavaIoFileDescriptorContentsAsAPointer  (env, afd);
 	if (!hysock_socketIsValid (socketP))
     	{
     		// return silently, leave validation in real I/O operation      		
@@ -374,7 +580,7 @@
   hysockaddr_struct sockaddrP;
   U_32 scope_id	= 0;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -437,7 +643,7 @@
   U_8 *	context	= NULL;	
   context = getConnectContext(env,passContext);	
   
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
 
   if (!hysock_socketIsValid (socketP))
     {
@@ -520,7 +726,7 @@
   hysockaddr_struct sockaddrP;
   U_32 scope_id	= 0;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -568,7 +774,7 @@
   hysocket_t socketP;
   I_32 result;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -598,7 +804,7 @@
 
   I_32 result, flags = 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -660,7 +866,7 @@
     return;
 
   socketS =
-    getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptorServer);
+    getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptorServer);
   if (!hysock_socketIsValid (socketS))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -695,7 +901,7 @@
   I_32 flags = 0;
   I_32 result;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       return FALSE;
@@ -718,7 +924,7 @@
   I_32 flags = 0;
   I_32 result =	0;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -761,7 +967,7 @@
   hysockaddr_struct sockaddrP;
   U_32 scope_id	= 0;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -810,7 +1016,7 @@
   hysocket_t socketP;
   hysockaddr_struct sockaddrP;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -858,7 +1064,7 @@
 
   /* This method still needs work for IPv6 support */
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -918,7 +1124,7 @@
   if (0	> result)
     return (jint) 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -981,7 +1187,7 @@
   if (0	> result)
     return (jint) 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1061,7 +1267,7 @@
     }
 
   /* get the handle to the socket */
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1156,7 +1362,7 @@
   netGetJavaNetInetAddressValue	(env, inetAddress, nhostAddrBytes, &length);
   nPort	= hysock_htons ((U_16) targetPort);
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (length ==	HYSOCK_INADDR6_LEN)
     {
       netGetJavaNetInetAddressScopeId (env, inetAddress, &scope_id);
@@ -1184,7 +1390,7 @@
   do
     {
       socketP =	
-	getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+	getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
 	  hymem_free_memory ( message);	
@@ -1254,7 +1460,7 @@
     {
       /* make sure the socket is still valid */	
       socketP =	
-	(hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
+	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env,
 	fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
@@ -1317,7 +1523,7 @@
   hysocket_t socketP;
   createSocket (env, thisObjFD,	HYSOCK_STREAM, preferIPv4Stack);
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env, thisObjFD);
+    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env, thisObjFD);
   setDefaultServerSocketOptions	(env, socketP);	
 }
 
@@ -1340,7 +1546,7 @@
   hysocket_t socketP;
   createSocket (env, thisObjFD,	HYSOCK_DGRAM, preferIPv4Stack);	
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env, thisObjFD);
+    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env, thisObjFD);
 
   hysock_setopt_bool (socketP, HY_SOL_SOCKET, HY_SO_REUSEPORT, &value);	
   hysock_setopt_bool (socketP, HY_SOL_SOCKET, HY_SO_REUSEADDR, &value);	
@@ -1381,7 +1587,7 @@
       finishTime = hytime_msec_clock ()	+ (UDATA) timeout;
     }
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1455,7 +1661,7 @@
 	  /* now check if the socket is	still connected.  Do it	here as	some platforms seem to think
they 
 	   * are connected if the socket is closed on them. */
 	  socketP =
-	    getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+	    getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
 	  if (!hysock_socketIsValid (socketP))
 	    {
 	      hysock_connect_with_timeout (socketP, &sockaddrP,	0,
@@ -1551,7 +1757,7 @@
 	&length);
 
       socketP =	
-	(hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
+	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env,
 	fileDescriptor);
       nPort = hysock_htons ((U_16) targetPort);	
       if (length == HYSOCK_INADDR_LEN)
@@ -1579,7 +1785,7 @@
   while	(sent <	msgLength)
     {
       socketP =	
-	(hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
+	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env,
 	fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
@@ -1631,7 +1837,7 @@
   if (0	> result)
     return (jint) 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1715,7 +1921,7 @@
   while	(sent <	count)
     {
       socketP =	
-	getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+	getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
 	  if (message != internalBuffer)
@@ -1770,7 +1976,7 @@
   hysocket_t socketP;
 
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
+    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env,
 		 fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
@@ -1798,7 +2004,7 @@
   hysocket_t socketP;
 
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
+    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env,
 		 fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
@@ -1834,19 +2040,16 @@
   result = pollSelectRead (env,	fileDescriptorServer, timeout, TRUE);
   if (0	> result)
     return;
-
   socketS =
-    getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptorServer);
+    getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptorServer);
   if (!hysock_socketIsValid (socketS))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
       return;
     }
-
   hysock_sockaddr_init6	(&sockaddrP, (U_8 *) nlocalAddrBytes,
        HYSOCK_INADDR_LEN, HYADDR_FAMILY_AFINET4, 0, 0, 0,
        socketS);
-
   result = hysock_accept (socketS, &sockaddrP, &socketNew);
   if (0	!= result)
     {
@@ -1871,7 +2074,7 @@
   hysocket_t socketP;
   createSocket (env, thisObjFD,	HYSOCK_STREAM, preferIPv4Stack);
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env, thisObjFD);
+    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer  (env, thisObjFD);
   setPlatformBindOptions (env, socketP);
 }
 
@@ -1954,7 +2157,7 @@
   PORT_ACCESS_FROM_ENV (env);
   hysocket_t hysocketP;	
 
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, aFileDescriptor);	
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, aFileDescriptor);	
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -2015,7 +2218,7 @@
   PORT_ACCESS_FROM_ENV (env);
   hysocket_t hysocketP;	
 
-  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, aFileDescriptor);	
+  hysocketP = getJavaIoFileDescriptorContentsAsAPointer  (env, aFileDescriptor);	
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -2125,7 +2328,7 @@
   hysocket_t socketP;
   I_32 result =	0;
 
-  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsAPointer  (env, fileDescriptor);
   if (hysock_socketIsValid (socketP))
     {
       /* Set the file descriptor before	closing	so the select polling loop will	terminate.
*/

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def?rev=389887&r1=389886&r2=389887&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def Wed Mar
29 12:58:53 2006
@@ -53,18 +53,6 @@
 	Java_java_io_FileDescriptor_oneTimeInitialization
 	Java_java_io_FileDescriptor_sync
 	Java_java_io_FileDescriptor_valid
-	Java_java_io_FileInputStream_available
-	Java_java_io_FileInputStream_closeImpl
-	Java_java_io_FileInputStream_oneTimeInitialization
-	Java_java_io_FileInputStream_openImpl
-	Java_java_io_FileInputStream_readByteImpl
-	Java_java_io_FileInputStream_readImpl
-	Java_java_io_FileInputStream_skip
-	Java_java_io_FileOutputStream_closeImpl
-	Java_java_io_FileOutputStream_oneTimeInitialization
-	Java_java_io_FileOutputStream_openImpl
-	Java_java_io_FileOutputStream_writeByteImpl
-	Java_java_io_FileOutputStream_writeImpl
 	Java_java_io_ObjectInputStream_newInstance
 	Java_java_io_ObjectInputStream_objSetField
 	Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2B
@@ -89,17 +77,6 @@
 	Java_java_io_ObjectStreamClass_getMethodSignature
 	Java_java_io_ObjectStreamClass_hasClinit
 	Java_java_io_ObjectStreamClass_oneTimeInitialization
-	Java_java_io_RandomAccessFile_closeImpl
-	Java_java_io_RandomAccessFile_getFilePointer
-	Java_java_io_RandomAccessFile_length
-	Java_java_io_RandomAccessFile_oneTimeInitialization
-	Java_java_io_RandomAccessFile_openImpl
-	Java_java_io_RandomAccessFile_readByteImpl
-	Java_java_io_RandomAccessFile_readImpl
-	Java_java_io_RandomAccessFile_seek
-	Java_java_io_RandomAccessFile_setLengthImpl
-	Java_java_io_RandomAccessFile_writeByteImpl
-	Java_java_io_RandomAccessFile_writeImpl
 	Java_java_lang_Double_doubleToLongBits
 	Java_java_lang_Double_doubleToRawLongBits
 	Java_java_lang_Double_longBitsToDouble
@@ -145,42 +122,6 @@
 	Java_java_net_InetAddress_inetNtoaImpl
 	Java_java_net_InetAddress_oneTimeInitialization
 	Java_java_net_NetworkInterface_getNetworkInterfacesImpl
-	Java_java_net_PlainDatagramSocketImpl_connectDatagramImpl2
-	Java_java_net_PlainDatagramSocketImpl_createDatagramSocketImpl
-	Java_java_net_PlainDatagramSocketImpl_disconnectDatagramImpl
-	Java_java_net_PlainDatagramSocketImpl_oneTimeInitialization
-	Java_java_net_PlainDatagramSocketImpl_peekDatagramImpl
-	Java_java_net_PlainDatagramSocketImpl_receiveDatagramImpl2
-	Java_java_net_PlainDatagramSocketImpl_recvConnectedDatagramImpl
-	Java_java_net_PlainDatagramSocketImpl_sendConnectedDatagramImpl
-	Java_java_net_PlainDatagramSocketImpl_sendDatagramImpl2
-	Java_java_net_PlainDatagramSocketImpl_socketBindImpl2
-	Java_java_net_PlainMulticastSocketImpl_createMulticastSocketImpl
-	Java_java_net_PlainServerSocketImpl_createServerStreamSocketImpl
-	Java_java_net_PlainSocketImpl2_connectStreamSocketImpl2
-	Java_java_net_PlainSocketImpl2_connectStreamWithTimeoutSocketImpl2
-	Java_java_net_PlainSocketImpl2_createStreamSocketImpl2
-	Java_java_net_PlainSocketImpl2_sendDatagramImpl2
-	Java_java_net_PlainSocketImpl2_socketBindImpl2
-	Java_java_net_Socket_getSocketFlags
-	Java_java_net_Socket_getSocketLocalAddressImpl
-	Java_java_net_Socket_getSocketLocalPortImpl
-	Java_java_net_Socket_getSocketOptionImpl
-	Java_java_net_Socket_oneTimeInitialization
-	Java_java_net_Socket_setSocketOptionImpl
-	Java_java_net_Socket_socketCloseImpl
-	Java_java_net_SocketImpl_acceptStreamSocketImpl
-	Java_java_net_SocketImpl_availableStreamImpl
-	Java_java_net_SocketImpl_createDatagramSocketImpl
-	Java_java_net_SocketImpl_createStreamSocketImpl
-	Java_java_net_SocketImpl_listenStreamSocketImpl
-	Java_java_net_SocketImpl_oneTimeInitialization
-	Java_java_net_SocketImpl_receiveStreamImpl
-	Java_java_net_SocketImpl_sendStreamImpl
-	Java_java_net_SocketImpl_sendUrgentDataImpl
-	Java_java_net_SocketImpl_shutdownInputImpl
-	Java_java_net_SocketImpl_shutdownOutputImpl
-	Java_java_net_SocketImpl_supportsUrgentDataImpl
 	Java_java_util_TimeZone_getCustomTimeZone
 	JNI_OnLoad
 	JNI_OnUnload

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile?rev=389887&r1=389886&r2=389887&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile Wed Mar 29
12:58:53 2006
@@ -28,14 +28,14 @@
 
 BUILDFILES = \
   $(SHAREDSUB)luni_copyright.obj $(SHAREDSUB)file.obj procimpl.obj \
-  $(SHAREDSUB)oos.obj $(SHAREDSUB)fileis.obj $(SHAREDSUB)simpl.obj \
-  $(SHAREDSUB)psimpl2.obj $(SHAREDSUB)nethelp.obj $(SHAREDSUB)floatbits.obj \
-  $(SHAREDSUB)rafile.obj $(SHAREDSUB)ois.obj helpers.obj $(SHAREDSUB)math.obj \
+  $(SHAREDSUB)oos.obj \
+  $(SHAREDSUB)nethelp.obj $(SHAREDSUB)floatbits.obj \
+  $(SHAREDSUB)ois.obj helpers.obj $(SHAREDSUB)math.obj \
   $(SHAREDSUB)luniglob.obj $(SHAREDSUB)proxy.obj $(SHAREDSUB)netif.obj \
   $(SHAREDSUB)process.obj $(SHAREDSUB)bigint.obj $(SHAREDSUB)osc.obj \
-  $(SHAREDSUB)socket.obj $(SHAREDSUB)inetadds.obj $(SHAREDSUB)pssimpl.obj \
-  $(SHAREDSUB)filedesc.obj $(SHAREDSUB)timezone.obj $(SHAREDSUB)pmsimpl.obj \
-  pdsimpl.obj $(SHAREDSUB)fileos.obj OSFileSystemWin32.obj \
+  $(SHAREDSUB)socket.obj $(SHAREDSUB)inetadds.obj \
+  $(SHAREDSUB)filedesc.obj $(SHAREDSUB)timezone.obj \
+  OSFileSystemWin32.obj \
   $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj OSMemory.obj \
   OSNetworkSystem.obj OSNetworkSystemWin32.obj
 



Mime
View raw message