More compilation fixes :(
This commit is contained in:
parent
8183760cd9
commit
83811d2960
@ -177,7 +177,7 @@ void ConnectToServer::asynchronousUpdate()
|
|||||||
if (strcmp(data, (char*)(received_data)) == 0)
|
if (strcmp(data, (char*)(received_data)) == 0)
|
||||||
{
|
{
|
||||||
Log::info("ConnectToServer", "LAN Server found : %s",
|
Log::info("ConnectToServer", "LAN Server found : %s",
|
||||||
sender.toString());
|
sender.toString().c_str());
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
// just check if the ip is ours : if so, then just use localhost (127.0.0.1)
|
// just check if the ip is ours : if so, then just use localhost (127.0.0.1)
|
||||||
struct ifaddrs *ifap, *ifa;
|
struct ifaddrs *ifap, *ifa;
|
||||||
@ -188,8 +188,8 @@ void ConnectToServer::asynchronousUpdate()
|
|||||||
if (ifa->ifa_addr->sa_family==AF_INET)
|
if (ifa->ifa_addr->sa_family==AF_INET)
|
||||||
{
|
{
|
||||||
sa = (struct sockaddr_in *) ifa->ifa_addr;
|
sa = (struct sockaddr_in *) ifa->ifa_addr;
|
||||||
if (ntohl(sa->sin_addr.s_addr) == sender.ip) // this interface is ours
|
if (ntohl(sa->sin_addr.s_addr) == sender.m_ip) // this interface is ours
|
||||||
sender.ip = 0x7f000001; // 127.0.0.1
|
sender.m_ip = 0x7f000001; // 127.0.0.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
freeifaddrs(ifap);
|
freeifaddrs(ifap);
|
||||||
@ -247,7 +247,7 @@ void ConnectToServer::asynchronousUpdate()
|
|||||||
timer = StkTime::getRealTime();
|
timer = StkTime::getRealTime();
|
||||||
NetworkManager::getInstance()->connect(m_server_address);
|
NetworkManager::getInstance()->connect(m_server_address);
|
||||||
Log::info("ConnectToServer", "Trying to connect to %s",
|
Log::info("ConnectToServer", "Trying to connect to %s",
|
||||||
m_server_address.toString());
|
m_server_address.toString().c_str());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user