[Kstars-devel] Server connection (solution?)

Pablo de Vicente p.devicente at wanadoo.es
Sat Mar 12 11:03:11 CET 2005


El Sábado, 12 de Marzo de 2005 01:23, Gaetano Vocca escribió:
> Dear all,
> still about the connection problem previously described, I think the key is
> at line 294 of indiserver.c:
>
> serv_socket.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
>
> for the little I know this line, together with the following "bind" forces
> the server accepting connections only from local addresses.
> Shouldn't it be changed into
>
> serv_socket.sin_addr.s_addr = htonl (INADDR_ANY);
>
> to allow connection from any host?
>
> Gaetano

Hello Gaetano,

  I would say that is the problem. I do not know if that is the source of the 
problem, but what if you want that a server be connected from any client you 
_need_ to use "INADDR_ANY" as the argument for htonl() and this true for UDP 
and TCP sockets (as this case). 

  I suppose Jasem will correct this bug in the CVS. Have you tried to change 
it to INADDR_ANY, recompile and test it?.

regards

Pablo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20050312/28e34be4/attachment.pgp


More information about the Kstars-devel mailing list