mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Fix a crash related to concurrent access to config file by different threads.
--HG-- branch : trunk
This commit is contained in:
@@ -26,6 +26,8 @@ static bool GetValueHelper(ACE_Configuration_Heap *mConf, const char *name, ACE_
|
||||
if (!mConf)
|
||||
return false;
|
||||
|
||||
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, sConfig.mMtx, false);
|
||||
|
||||
ACE_TString section_name;
|
||||
ACE_Configuration_Section_Key section_key;
|
||||
ACE_Configuration_Section_Key root_key = mConf->root_section();
|
||||
|
||||
@@ -43,6 +43,9 @@ class Config
|
||||
float GetFloatDefault(const char * name, const float def);
|
||||
|
||||
std::string GetFilename() const { return mFilename; }
|
||||
|
||||
ACE_Thread_Mutex mMtx;
|
||||
|
||||
private:
|
||||
std::string mFilename;
|
||||
ACE_Configuration_Heap *mConf;
|
||||
|
||||
Reference in New Issue
Block a user