[Kstars-devel] Server connection (solution?)

Gaetano Vocca yagvoc-web at yahoo.it
Sat Mar 12 19:33:52 CET 2005


On Saturday 12 March 2005 10:03, Pablo de Vicente wrote:
> 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.
Hello Pablo,
I tested it already and, changing the line to INADDR_ANY, everything works.
The same issue is also in fli_ccd.c

Thank you
Gaetano


More information about the Kstars-devel mailing list