|
|
@ -121,7 +121,7 @@ bool TCPServer::initSocket()
|
|
|
|
socket_addr.sin_family = AF_INET;
|
|
|
|
socket_addr.sin_family = AF_INET;
|
|
|
|
socket_addr.sin_port = htons( TCPServerPort ); // 0 = choose port freely
|
|
|
|
socket_addr.sin_port = htons( TCPServerPort ); // 0 = choose port freely
|
|
|
|
socket_addr.sin_addr.s_addr = htonl( inet_addr("0.0.0.0") );
|
|
|
|
socket_addr.sin_addr.s_addr = htonl( inet_addr("0.0.0.0") );
|
|
|
|
if ( bind( theSocket, (struct sockaddr *) &socket_addr,
|
|
|
|
if ( ::bind( theSocket, (struct sockaddr *) &socket_addr,
|
|
|
|
sizeof(struct sockaddr_in) ) < 0 )
|
|
|
|
sizeof(struct sockaddr_in) ) < 0 )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
arts_warning("MCOP TCPServer: can't bind to port/address");
|
|
|
|
arts_warning("MCOP TCPServer: can't bind to port/address");
|
|
|
|