Loading ndb/include/transporter/TransporterRegistry.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,8 @@ public: }; Vector<Transporter_interface> m_transporter_interface; void add_transporter_interface(const char *interf, unsigned short port); struct in_addr get_connect_address(NodeId node_id) const; protected: private: Loading ndb/src/common/mgmcommon/ConfigRetriever.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -131,16 +131,14 @@ ConfigRetriever::getConfig() { } ndb_mgm_configuration * ConfigRetriever::getConfig(NdbMgmHandle m_handle){ ConfigRetriever::getConfig(NdbMgmHandle m_handle) { ndb_mgm_configuration * conf = ndb_mgm_get_configuration(m_handle,m_version); if(conf == 0){ if(conf == 0) { setError(CR_ERROR, ndb_mgm_get_latest_error_desc(m_handle)); return 0; } ndb_mgm_disconnect(m_handle); return conf; } Loading ndb/src/common/transporter/Transporter.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ Transporter::Transporter(TransporterRegistry &t_reg, m_connected = false; m_timeOutMillis = 1000; m_connect_address.s_addr= 0; if (isServer) m_socket_client= 0; else Loading @@ -98,6 +99,13 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) { DBUG_RETURN(true); // TODO assert(0); } { struct sockaddr addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); int r= getpeername(sockfd, &addr, &addrlen); m_connect_address= ((struct sockaddr_in *)&addr)->sin_addr; } bool res = connect_server_impl(sockfd); if(res){ m_connected = true; Loading Loading @@ -164,6 +172,13 @@ Transporter::connect_client() { g_eventLogger.warning("Unable to verify transporter compatability with node %d", nodeId); } { struct sockaddr addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); int r= getpeername(sockfd, &addr, &addrlen); m_connect_address= ((struct sockaddr_in *)&addr)->sin_addr; } bool res = connect_client_impl(sockfd); if(res){ m_connected = true; Loading ndb/src/common/transporter/Transporter.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ protected: private: SocketClient *m_socket_client; struct in_addr m_connect_address; protected: Uint32 getErrorCount(); Loading ndb/src/common/transporter/TransporterRegistry.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,12 @@ extern int g_ndb_shm_signum; #include <EventLogger.hpp> extern EventLogger g_eventLogger; struct in_addr TransporterRegistry::get_connect_address(NodeId node_id) const { return theTransporters[node_id]->m_connect_address; } SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd) { DBUG_ENTER("SocketServer::Session * TransporterService::newSession"); Loading Loading
ndb/include/transporter/TransporterRegistry.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,8 @@ public: }; Vector<Transporter_interface> m_transporter_interface; void add_transporter_interface(const char *interf, unsigned short port); struct in_addr get_connect_address(NodeId node_id) const; protected: private: Loading
ndb/src/common/mgmcommon/ConfigRetriever.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -131,16 +131,14 @@ ConfigRetriever::getConfig() { } ndb_mgm_configuration * ConfigRetriever::getConfig(NdbMgmHandle m_handle){ ConfigRetriever::getConfig(NdbMgmHandle m_handle) { ndb_mgm_configuration * conf = ndb_mgm_get_configuration(m_handle,m_version); if(conf == 0){ if(conf == 0) { setError(CR_ERROR, ndb_mgm_get_latest_error_desc(m_handle)); return 0; } ndb_mgm_disconnect(m_handle); return conf; } Loading
ndb/src/common/transporter/Transporter.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ Transporter::Transporter(TransporterRegistry &t_reg, m_connected = false; m_timeOutMillis = 1000; m_connect_address.s_addr= 0; if (isServer) m_socket_client= 0; else Loading @@ -98,6 +99,13 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) { DBUG_RETURN(true); // TODO assert(0); } { struct sockaddr addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); int r= getpeername(sockfd, &addr, &addrlen); m_connect_address= ((struct sockaddr_in *)&addr)->sin_addr; } bool res = connect_server_impl(sockfd); if(res){ m_connected = true; Loading Loading @@ -164,6 +172,13 @@ Transporter::connect_client() { g_eventLogger.warning("Unable to verify transporter compatability with node %d", nodeId); } { struct sockaddr addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); int r= getpeername(sockfd, &addr, &addrlen); m_connect_address= ((struct sockaddr_in *)&addr)->sin_addr; } bool res = connect_client_impl(sockfd); if(res){ m_connected = true; Loading
ndb/src/common/transporter/Transporter.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ protected: private: SocketClient *m_socket_client; struct in_addr m_connect_address; protected: Uint32 getErrorCount(); Loading
ndb/src/common/transporter/TransporterRegistry.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,12 @@ extern int g_ndb_shm_signum; #include <EventLogger.hpp> extern EventLogger g_eventLogger; struct in_addr TransporterRegistry::get_connect_address(NodeId node_id) const { return theTransporters[node_id]->m_connect_address; } SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd) { DBUG_ENTER("SocketServer::Session * TransporterService::newSession"); Loading