From 7a057433e1cd919b25adcc7db377fef4b70a0ed9 Mon Sep 17 00:00:00 2001 From: "tomas@poseidon.ndb.mysql.com" <> Date: Thu, 17 Feb 2005 10:39:54 +0100 Subject: [PATCH] added mutex lock for "get config" --- ndb/include/transporter/TransporterRegistry.hpp | 5 +++++ ndb/src/mgmsrv/Services.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ndb/include/transporter/TransporterRegistry.hpp b/ndb/include/transporter/TransporterRegistry.hpp index 15f1632061..d0a761998e 100644 --- a/ndb/include/transporter/TransporterRegistry.hpp +++ b/ndb/include/transporter/TransporterRegistry.hpp @@ -101,6 +101,11 @@ public: unsigned maxTransporters = MAX_NTRANSPORTERS, unsigned sizeOfLongSignalMemory = 100); + /** + * this handle will be used in the client connect thread + * to fetch information on dynamic ports. The old handle + * id destroyed, and this is destroyed by the destructor + */ void set_mgm_handle(NdbMgmHandle h); NdbMgmHandle get_mgm_handle(void) { return m_mgm_handle; }; diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp index a43bf13fd1..fdfe2f92ac 100644 --- a/ndb/src/mgmsrv/Services.cpp +++ b/ndb/src/mgmsrv/Services.cpp @@ -572,11 +572,13 @@ MgmApiSession::getConfig_common(Parser_t::Context &, } } + NdbMutex_Lock(m_mgmsrv.m_configMutex); const ConfigValues * cfg = &conf->m_configValues->m_config; const Uint32 size = cfg->getPackedSize(); UtilBuffer src; cfg->pack(src); + NdbMutex_Unlock(m_mgmsrv.m_configMutex); BaseString str; int res = base64_encode(src, str); -- 2.30.9