Commit db86cb81 authored by unknown's avatar unknown
Browse files

changed order of transporter_connect and closing the mgmapisession


ndb/src/mgmsrv/MgmtSrvr.cpp:
  removed the extra setting of connected node, not needed
parent 9cc85f40
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@
#include <mgmapi_configuration.hpp>
#include <mgmapi_config_parameters.h>
#include <m_string.h>
#include <Transporter.hpp>

//#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG
@@ -2139,11 +2138,7 @@ MgmtSrvr::get_connected_nodes(NodeBitmask &connected_nodes) const
      if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB)
      {
	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.set(i);
	}
      }
    }
  }
+5 −5
Original line number Diff line number Diff line
@@ -1546,19 +1546,19 @@ MgmApiSession::check_connection(Parser_t::Context &ctx,

void
MgmApiSession::transporter_connect(Parser_t::Context &ctx,
				   Properties const &args) {
  NDB_SOCKET_TYPE s= m_socket;
				   Properties const &args)
{
  m_mgmsrv.transporter_connect(m_socket);

  m_stop= true;
  m_stopped= true; // force a stop (no closing socket)
  m_socket= NDB_INVALID_SOCKET;   // so nobody closes it

  m_mgmsrv.transporter_connect(s);
}

void
MgmApiSession::get_mgmd_nodeid(Parser_t::Context &ctx,
			       Properties const &args) {
			       Properties const &args)
{
  m_output->println("get mgmd nodeid reply");
  m_output->println("nodeid:%u",m_mgmsrv.getOwnNodeId());  
  m_output->println("");