[kaffe] Re: MulticastSocket not joining more than one interface

Everton da Silva Marques everton at lab.ipaccess.diveo.net.br
Wed Dec 3 15:22:03 PST 2003


This is a quick fix for the issue. It's
possibly partial as I haven't looked into
other join/leave-related methods.

$ diff -u libraries/clib/net/PlainDatagramSocketImpl.c.~1.35.~ libraries/clib/net/PlainDatagramSocketImpl.c
--- libraries/clib/net/PlainDatagramSocketImpl.c.~1.35.~        2003-12-03 20:15:41.000000000 -0200
+++ libraries/clib/net/PlainDatagramSocketImpl.c        2003-12-03 20:21:06.000000000 -0200
@@ -531,10 +531,14 @@
 #if defined(IP_ADD_MEMBERSHIP)
        int r;
        struct ip_mreq ipm;
+       int iface_addr;

        memcpy(&ipm.imr_multiaddr, unhand_byte_array(unhand(laddr)->addr),
               sizeof(ipm.imr_multiaddr));
-       ipm.imr_interface.s_addr = htonl(INADDR_ANY);
+
+       iface_addr = gnu_java_net_PlainDatagramSocketImpl_socketGetOption(this, 
java_net_SocketOptions_IP_MULTICAST_IF);
+
+       ipm.imr_interface.s_addr = htonl(iface_addr);

 DBG(NATIVENET,
        dprintf("datagram_join (%p, %p) => %s\n",
$






More information about the kaffe mailing list