Hi all,
I was getting java.io.Exception: No such device when calling java.net.MulticastSocket.joinGroup with valid arguments.
I've traced it down to PlainDatagramSocketImpl.c and found out that using unhand_object_array, ipm.imr_interface was filling garbages.
Changing unhand_object_array to unhand_array_array (see attached patch ) the problem went away.
BTW, looking at definition of unhand_object_array and unhand_array_array and the related structs HArrayOfObject and HArrayOfArray I'm not sure I understand the naming convention.
After patching PlainDatagramSocketImpl.c, unhand_object_array is not used anywhere and I think it's wrong anyway.
Cheers, Nektarios
Index: libraries/clib/net/PlainDatagramSocketImpl.c
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/clib/net/PlainDatagramSocketImpl.c,v
retrieving revision 1.51
diff -u -r1.51 PlainDatagramSocketImpl.c
--- libraries/clib/net/PlainDatagramSocketImpl.c 21 Dec 2004 05:49:58
-0000 1.51
+++ libraries/clib/net/PlainDatagramSocketImpl.c 11 Apr 2005 11:08:52
-0000
@@ -634,7 +634,7 @@
if( jni && obj_length(unhand(unhand(jni)->inetAddresses)->elementData)
!= 0)
{
struct Hjava_net_InetAddress* if_addr = (struct Hjava_net_InetAddress
*)
-
unhand_object_array(unhand(unhand(jni)->inetAddresses)->elementData);
+
unhand_array_array(unhand(unhand(jni)->inetAddresses)->elementData)[0] ;
memcpy(&ipm.imr_interface, unhand_byte_array(unhand(if_addr)->addr),
sizeof(ipm.imr_interface));;
@@ -682,7 +682,7 @@
if( jni && obj_length(unhand(unhand(jni)->inetAddresses)->elementData)
!= 0)
{
struct Hjava_net_InetAddress* if_addr = (struct
Hjava_net_InetAddress *)
-
unhand_object_array(unhand(unhand(jni)->inetAddresses)->elementData);
+
unhand_array_array(unhand(unhand(jni)->inetAddresses)->elementData)[0];
memcpy(&ipm.imr_interface,
unhand_byte_array(unhand(if_addr)->addr),
_______________________________________________ kaffe mailing list [email protected] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
