Fixing thread safety of ConfigFile.
This commit is contained in:
@@ -584,6 +584,12 @@ void ConfigFile::updateConfig(ConfigState myConfigState)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigState ConfigFile::getConfigState() const
|
||||||
|
{
|
||||||
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
return myConfigState;
|
||||||
|
}
|
||||||
|
|
||||||
string ConfigFile::readConfigString(string varName) const
|
string ConfigFile::readConfigString(string varName) const
|
||||||
{
|
{
|
||||||
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ public:
|
|||||||
void writeBuffer() const;
|
void writeBuffer() const;
|
||||||
|
|
||||||
void updateConfig(ConfigState);
|
void updateConfig(ConfigState);
|
||||||
ConfigState getConfigState() const {
|
ConfigState getConfigState() const;
|
||||||
return myConfigState;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string readConfigString(std::string varName) const;
|
std::string readConfigString(std::string varName) const;
|
||||||
std::list<std::string> readConfigStringList(std::string varName) const;
|
std::list<std::string> readConfigStringList(std::string varName) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user