mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 23:45:14 +02:00
- bugfix for trying socket connect when nic is down
- removed platform mismatch console printf
This commit is contained in:
@@ -221,7 +221,7 @@ void ClientInterface::updateLobby() {
|
|||||||
string playerNameStr = getHumanPlayerName();
|
string playerNameStr = getHumanPlayerName();
|
||||||
sErr = "Warning, Server and client are using the same version but different platforms.\n\nServer: " + networkMessageIntro.getVersionString() +
|
sErr = "Warning, Server and client are using the same version but different platforms.\n\nServer: " + networkMessageIntro.getVersionString() +
|
||||||
"\nClient: " + getNetworkVersionSVNString() + " player [" + playerNameStr + "]";
|
"\nClient: " + getNetworkVersionSVNString() + " player [" + playerNameStr + "]";
|
||||||
printf("%s\n",sErr.c_str());
|
//printf("%s\n",sErr.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Config::getInstance().getBool("PlatformConsistencyChecks","true") &&
|
if(Config::getInstance().getBool("PlatformConsistencyChecks","true") &&
|
||||||
|
@@ -525,7 +525,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
string playerNameStr = name;
|
string playerNameStr = name;
|
||||||
sErr = "Warning, Server and client are using the same version but different platforms.\n\nServer: " + getNetworkVersionSVNString() +
|
sErr = "Warning, Server and client are using the same version but different platforms.\n\nServer: " + getNetworkVersionSVNString() +
|
||||||
"\nClient: " + networkMessageIntro.getVersionString() + " player [" + playerNameStr + "]";
|
"\nClient: " + networkMessageIntro.getVersionString() + " player [" + playerNameStr + "]";
|
||||||
printf("%s\n",sErr.c_str());
|
//printf("%s\n",sErr.c_str());
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] %s\n",__FILE__,__FUNCTION__,__LINE__,sErr.c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] %s\n",__FILE__,__FUNCTION__,__LINE__,sErr.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1358,8 +1358,16 @@ void Socket::setBlock(bool block){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Socket::setBlock(bool block, PLATFORM_SOCKET socket) {
|
void Socket::setBlock(bool block, PLATFORM_SOCKET socket) {
|
||||||
|
// don't waste time if the socket is invalid
|
||||||
|
if(isSocketValid(&socket) == false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
int currentFlags = fcntl(socket, F_GETFL);
|
int currentFlags = fcntl(socket, F_GETFL);
|
||||||
|
if(currentFlags < 0) {
|
||||||
|
currentFlags = 0;
|
||||||
|
}
|
||||||
if(block == true) {
|
if(block == true) {
|
||||||
currentFlags &= (~O_NONBLOCK);
|
currentFlags &= (~O_NONBLOCK);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user