Fixing thread safety of ConfigFile.

This commit is contained in:
lotodore
2011-10-20 11:36:41 +00:00
parent b43909d742
commit 603d4826fd
2 changed files with 7 additions and 3 deletions
+6
View File
@@ -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
{
boost::recursive_mutex::scoped_lock lock(m_configMutex);
+1 -3
View File
@@ -39,9 +39,7 @@ public:
void writeBuffer() const;
void updateConfig(ConfigState);
ConfigState getConfigState() const {
return myConfigState;
}
ConfigState getConfigState() const;
std::string readConfigString(std::string varName) const;
std::list<std::string> readConfigStringList(std::string varName) const;