changed order of transporter_connect and closing the mgmapisession

parent d360786e
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#include <mgmapi_configuration.hpp> #include <mgmapi_configuration.hpp>
#include <mgmapi_config_parameters.h> #include <mgmapi_config_parameters.h>
#include <m_string.h> #include <m_string.h>
#include <Transporter.hpp>
//#define MGM_SRV_DEBUG //#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG #ifdef MGM_SRV_DEBUG
...@@ -2139,11 +2138,7 @@ MgmtSrvr::get_connected_nodes(NodeBitmask &connected_nodes) const ...@@ -2139,11 +2138,7 @@ MgmtSrvr::get_connected_nodes(NodeBitmask &connected_nodes) const
if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB) if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB)
{ {
const ClusterMgr::Node &node= theFacade->theClusterMgr->getNodeInfo(i); const ClusterMgr::Node &node= theFacade->theClusterMgr->getNodeInfo(i);
if (theFacade->get_registry()->get_transporter(i)->isConnected()) connected_nodes.bitOR(node.m_state.m_connected_nodes);
{
connected_nodes.bitOR(node.m_state.m_connected_nodes);
connected_nodes.set(i);
}
} }
} }
} }
......
...@@ -1546,19 +1546,19 @@ MgmApiSession::check_connection(Parser_t::Context &ctx, ...@@ -1546,19 +1546,19 @@ MgmApiSession::check_connection(Parser_t::Context &ctx,
void void
MgmApiSession::transporter_connect(Parser_t::Context &ctx, MgmApiSession::transporter_connect(Parser_t::Context &ctx,
Properties const &args) { Properties const &args)
NDB_SOCKET_TYPE s= m_socket; {
m_mgmsrv.transporter_connect(m_socket);
m_stop= true; m_stop= true;
m_stopped= true; // force a stop (no closing socket) m_stopped= true; // force a stop (no closing socket)
m_socket= NDB_INVALID_SOCKET; // so nobody closes it m_socket= NDB_INVALID_SOCKET; // so nobody closes it
m_mgmsrv.transporter_connect(s);
} }
void void
MgmApiSession::get_mgmd_nodeid(Parser_t::Context &ctx, MgmApiSession::get_mgmd_nodeid(Parser_t::Context &ctx,
Properties const &args) { Properties const &args)
{
m_output->println("get mgmd nodeid reply"); m_output->println("get mgmd nodeid reply");
m_output->println("nodeid:%u",m_mgmsrv.getOwnNodeId()); m_output->println("nodeid:%u",m_mgmsrv.getOwnNodeId());
m_output->println(""); m_output->println("");
......
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