mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-16 06:13:50 -04:00
ConnectionServer: add altPublicBindAddress config option
This commit is contained in:
@@ -38,13 +38,26 @@ 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);
|
||||
}
|
||||
|
||||
DEBUG_WARNING(true, ("Customer facing cluster address is %s", temp.m_address.c_str()));
|
||||
|
||||
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);
|
||||
@@ -75,7 +88,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()));
|
||||
|
||||
}
|
||||
|
||||
@@ -94,6 +107,7 @@ 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;
|
||||
@@ -122,6 +136,7 @@ TaskGetClusterList::GetClustersQuery::GetClustersQuery() :
|
||||
cluster_id(),
|
||||
cluster_name(),
|
||||
address(),
|
||||
altAddress(),
|
||||
port(),
|
||||
secret(),
|
||||
locked(),
|
||||
|
||||
@@ -36,6 +36,7 @@ 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
|
||||
@@ -63,6 +64,7 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user