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

Guilhem Lavaux guilhem at kaffe.org
Sun Dec 14 01:27:04 PST 2003


Everton da Silva Marques wrote:

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

Hi Everton,

Never late than never, I've checked the patch in with a few others. 
Thanks for pointing us the problem !

Cheers,
Guilhem.

 >
 >$ 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