Commit d4b0127d authored by unknown's avatar unknown

Restore (depricated) functionality of specifying a port number per connection.


ndb/src/mgmsrv/ConfigInfo.cpp:
  fixPortNumber:
  - Remove unneeded is_mgm_connection variable
  - restore functionality of specifying a port number per connection.
parent 9fcbd39e
...@@ -3150,15 +3150,12 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -3150,15 +3150,12 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
ctx.m_config->get("Node", id2, &node2); ctx.m_config->get("Node", id2, &node2);
node2->get("Type", &type2); node2->get("Type", &type2);
bool is_mgm_connection= true;
if(strcmp(type1, MGM_TOKEN)==0) if(strcmp(type1, MGM_TOKEN)==0)
node->get("PortNumber",&port); node->get("PortNumber",&port);
else if(strcmp(type2, MGM_TOKEN)==0) else if(strcmp(type2, MGM_TOKEN)==0)
node2->get("PortNumber",&port); node2->get("PortNumber",&port);
else
is_mgm_connection= false;
if (!is_mgm_connection && if (!port &&
!node->get("ServerPort", &port) && !node->get("ServerPort", &port) &&
!ctx.m_userProperties.get("ServerPort_", id1, &port)) !ctx.m_userProperties.get("ServerPort_", id1, &port))
{ {
...@@ -3192,7 +3189,16 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -3192,7 +3189,16 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
} }
} }
if(ctx.m_currentSection->contains("PortNumber")) {
ndbout << "PortNumber should no longer be specificied "
<< "per connection, please remove from config. "
<< "Will be changed to " << port << endl;
ctx.m_currentSection->put("PortNumber", port, true);
}
else
{
ctx.m_currentSection->put("PortNumber", port); ctx.m_currentSection->put("PortNumber", port);
}
DBUG_PRINT("info", ("connection %d-%d port %d host %s", DBUG_PRINT("info", ("connection %d-%d port %d host %s",
id1, id2, port, hostname.c_str())); id1, id2, port, hostname.c_str()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment