squash some of my overly verbose commits that have no uses

This commit is contained in:
DarthArgus
2016-09-26 06:27:53 +00:00
parent 10b86bcc7f
commit 1651feb4de
8 changed files with 29 additions and 37 deletions
@@ -69,7 +69,7 @@ void ConfigLoginServer::install(void)
KEY_INT (centralServicePort, 44452);
KEY_INT (clientServicePort, 44453);
KEY_INT (clientOverflowLimit, 1024 * 8);
KEY_INT (maxClients, 250);
KEY_INT (maxClients, 3000);
KEY_INT (taskServicePort, 44459);
KEY_INT (pingServicePort, 44460);
KEY_INT (httpServicePort, 44490);
@@ -112,7 +112,7 @@ void ConfigLoginServer::install(void)
KEY_INT (populationHeavyThresholdPercent, 32);
KEY_INT (populationMediumThresholdPercent, 16);
KEY_INT (populationLightThresholdPercent, 8);
KEY_INT (csToolPort, 10666);
KEY_INT (csToolPort, 0); // use 10666 if you want to turn the tool on
KEY_BOOL(requireSecureLoginForCsTool, true);
KEY_BOOL(useExternalAuth, false);
KEY_STRING(externalAuthURL, "");
@@ -160,8 +160,12 @@ LoginServer::LoginServer() :
m_centralService = new Service(ConnectionAllocator<CentralServerConnection>(), setup);
}
// only start the customer tool connection listener if the port is set (defaults to 0)
setup.port = ConfigLoginServer::getCSToolPort();
m_CSService = new Service(ConnectionAllocator<CSToolConnection>(), setup);
if (setup.port)
{
m_CSService = new Service(ConnectionAllocator<CSToolConnection>(), setup);
}
// set up message connections
connectToMessage("ClaimRewardsMessage");
@@ -387,12 +391,17 @@ void LoginServer::receiveMessage(const MessageDispatch::Emitter & source, const
CentralServerConnection * connection = const_cast<CentralServerConnection*>(safe_cast<const CentralServerConnection *>(&source));
DEBUG_REPORT_LOG(true, ("Cluster connection %s opened\n", msg.getClusterName().c_str()));
ClusterListEntry *cle = nullptr;
if (ConfigLoginServer::getDevelopmentMode())
{
// in this mode, we trust the name sent by the cluster and we dynamically add clusters we don't know about
cle = findClusterByName(msg.getClusterName());
if (!cle)
cle = addCluster(msg.getClusterName());
if (ConfigLoginServer::getDevelopmentMode()) {
// in this mode, we trust the name sent by the cluster
cle = findClusterByName(msg.getClusterName());
#ifdef _DEBUG
// if in debug mode, we dynamically add clusters we don't know about
// DO NOT USE ON PRODUCTION! This is where other servers are getting hijacked.
if (!cle)
{
cle = addCluster(msg.getClusterName());
}
#endif
}
else
{
@@ -407,7 +416,7 @@ void LoginServer::receiveMessage(const MessageDispatch::Emitter & source, const
disconnectCluster(*cle, true, false);
cle = nullptr;
}
}
}
if (cle)
{
@@ -1961,4 +1970,4 @@ void LoginServer::setClusterInfoByName(const std::string &name, const std::strin
}
}
// ======================================================================
// ======================================================================
@@ -38,24 +38,13 @@ bool TaskGetClusterList::process(DB::Session *session)
while ((rowsFetched = qry.fetch()) > 0)
{
qry.altAddress.getValue(temp.m_address);
if (temp.m_address.empty())
{
qry.address.getValue(temp.m_address);
}
if (qry.port.isNull())
{
temp.m_port = ConfigLoginServer::getCentralServicePort();
}
else
{
temp.m_port = static_cast<uint16>(qry.port.getValue());
}
qry.cluster_id.getValue(temp.m_clusterId);
qry.cluster_name.getValue(temp.m_clusterName);
qry.address.getValue(temp.m_address);
if (qry.port.isNull())
temp.m_port = ConfigLoginServer::getCentralServicePort();
else
temp.m_port = static_cast<uint16>(qry.port.getValue());
qry.secret.getValue(temp.m_secret);
qry.locked.getValue(temp.m_locked);
qry.not_recommended.getValue(temp.m_notRecommended);
@@ -88,7 +77,7 @@ void TaskGetClusterList::onComplete()
void TaskGetClusterList::GetClustersQuery::getSQL(std::string &sql)
{
sql=std::string("begin :result := ")+DatabaseConnection::getInstance().getSchemaQualifier()+"login.get_cluster_list(:group_id); end;";
DEBUG_REPORT_LOG(true, ("TaskGetClusterList SQL: %s\n", sql.c_str()));
// DEBUG_REPORT_LOG(true, ("TaskGetClusterList SQL: %s\n", sql.c_str()));
}
@@ -107,7 +96,6 @@ bool TaskGetClusterList::GetClustersQuery::bindColumns()
if (!bindCol(cluster_id)) return false;
if (!bindCol(cluster_name)) return false;
if (!bindCol(address)) return false;
if (!bindCol(altAddress)) return false;
if (!bindCol(port)) return false;
if (!bindCol(secret)) return false;
if (!bindCol(locked)) return false;
@@ -136,7 +124,6 @@ TaskGetClusterList::GetClustersQuery::GetClustersQuery() :
cluster_id(),
cluster_name(),
address(),
altAddress(),
port(),
secret(),
locked(),
@@ -36,7 +36,6 @@ class TaskGetClusterList : public DB::TaskRequest
DB::BindableLong cluster_id; //lint !e1925 // public data member
DB::BindableString<255> cluster_name; //lint !e1925 // public data member
DB::BindableString<255> address; //lint !e1925 // public data member
DB::BindableString<255> altAddress; //lint !e1925 // public data member
DB::BindableLong port; //lint !e1925 // public data member
DB::BindableBool secret; //lint !e1925 // public data member
DB::BindableBool locked; //lint !e1925 // public data member
@@ -64,7 +63,6 @@ class TaskGetClusterList : public DB::TaskRequest
uint32 m_clusterId;
std::string m_clusterName;
std::string m_address;
std::string m_altAddress;
uint16 m_port;
bool m_secret;
bool m_locked;