ConnectionServer: add altPublicBindAddress config option

This commit is contained in:
DarthArgus
2016-09-26 06:27:45 +00:00
parent e0bd4f3c02
commit 05f8a322fb
8 changed files with 53 additions and 9 deletions
@@ -484,7 +484,9 @@ void ConnectionServer::handleConnectionServerIdMessage(const ConnectionServerId
uint16 chatPort = 0;
uint16 csPort = 0;
if (c)
{
chatPort = c->getBindPort();
}
if (cs)
{
@@ -493,12 +495,21 @@ void ConnectionServer::handleConnectionServerIdMessage(const ConnectionServerId
uint16 publicPort = 0;
if (servicePublic)
{
publicPort = servicePublic->getBindPort();
}
uint16 privatePort = 0;
if (servicePrivate)
{
privatePort = servicePrivate->getBindPort();
}
std::string clientServicePublicBindAddress = NetworkHandler::getHostName();
std::string clientServicePublicBindAddress = ConfigConnectionServer::getPublicBindAddress();
if (clientServicePublicBindAddress.empty())
{
clientServicePublicBindAddress = NetworkHandler::getHostName();
}
NOT_NULL(gameService);
NOT_NULL(chatService);
@@ -508,7 +519,9 @@ void ConnectionServer::handleConnectionServerIdMessage(const ConnectionServerId
sendToCentralProcess(ncs);
}
else
{
FATAL(true, ("Error in connection server startup"));
}
}
// ----------------------------------------------------------------------
@@ -1566,4 +1579,4 @@ void ConnectionServer::setDone(char const *reasonfmt, ...)
}
}
// ======================================================================
// ======================================================================