Udp broadcast troubles, partially solved... but not totally....:(

Fredrik Öhrström d92-foh at nada.kth.se
Thu Jan 22 09:21:32 PST 1998


I am trying to get Visigenic Corba Java to work. It broadcasts udp
data to find the Osagent. Broadcasting was impossible in kaffe since 
the linux sockets defaults to no broadcast. So it was completely
quiet on the network. I run RedHat 5.0.

Adding:
int foo=1, foolen=4;
setsockopt (fd, SOL_SOCKET, SO_BROADCAST, &foo, foolen);

to java_net_PlainDatagramSocketImpl_datagramSocketCreate(..)
in PlainDatagramSocketImpl.c fixes this....

However now I got strange ECONNREFUSED errors and after snooping
around in the TCP/IP FAQ I found another flag:
int foo=1, foolen=4;
setsockopt (fd, SOL_SOCKET, SO_BSDCOMPAT, &foo, foolen);

Which makes the system behave like bsd according to the sockets.
Now I receive the correct data BUT kaffe stops with

kaffe: locks.c:158: _unlockMutex: Assertion `lk->holder ==
(currentThread)' failed.
Aborted (core dumped)

Anyone got any idea of where to look? My hands are dirty already so I 
do not mind looking further. Which locks.c file is this? 
I thought it was kaffe-0.9.2/kaffe/kaffevm/locks.c but when I do
changes in this file it does not affect the error. And yes I have
clean the source and rebuilt everything.

Any help is greatly appreciated. I really want to run Corba with
Java Linux.

//Fredrik









More information about the kaffe mailing list