Hi,

On Sat, 2002-01-19 at 21:22, Mark Wielaard wrote:
> Now I seem to have the same situation that Brian has. Compiling orp with
> its own native libraries makes my DataTest program work OK. But when
> using the Classpath libraries I now get:
> 
> ReceiveBuffer
> Orig size: 65535
> New size: 16000
> SendBuffer
> Exception: java.net.SocketException: No such file or directory
> 
> I don't know why though.
> Will investigate some more.

Found it!
It turned out that the error message was not very descriptive and that
the definition of SO_REUSEADDR and SO_SNDBUF were swapped in javanet.h
in Classpath.

I will check in this fix:

        * native/jni/java-net/javanet.c (_javanet_get_option): make
        exception message more clear.
        * native/jni/java-net/javanet.h
        (SOCKOPT_SO_SNDBUF,SOCKOPT_SO_REUSEADDR): swap definitions.

Cheers,

Mark
Index: native/jni/java-net/javanet.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-net/javanet.c,v
retrieving revision 1.2
diff -u -r1.2 javanet.c
--- native/jni/java-net/javanet.c       27 Nov 2001 03:12:02 -0000      1.2
+++ native/jni/java-net/javanet.c       19 Jan 2002 21:17:45 -0000
@@ -1131,8 +1131,8 @@
          break;
 
       default:
-        JCL_ThrowException(env, SOCKET_EXCEPTION, strerror(errno)); 
-         return(0);
+        JCL_ThrowException(env, SOCKET_EXCEPTION, "No such option" ); 
+        return(0);
     }
 
   return(0);
Index: native/jni/java-net/javanet.h
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-net/javanet.h,v
retrieving revision 1.1
diff -u -r1.1 javanet.h
--- native/jni/java-net/javanet.h       5 Nov 2001 02:56:47 -0000       1.1
+++ native/jni/java-net/javanet.h       19 Jan 2002 21:17:45 -0000
@@ -48,9 +48,9 @@
 #define SOCKOPT_SO_BINDADDR 15
 #define SOCKOPT_SO_LINGER 128
 #define SOCKOPT_SO_TIMEOUT 4102
-#define SOCKOPT_SO_SNDBUF 4
+#define SOCKOPT_SO_SNDBUF 4097
 #define SOCKOPT_SO_RCVBUF 4098
-#define SOCKOPT_SO_REUSEADDR 4097
+#define SOCKOPT_SO_REUSEADDR 4
 #define SOCKOPT_IP_MULTICAST_IF 16
 
 /* Internal option identifiers. Not needed for JDK compatibility */

Reply via email to