Recursive mutex in configfile.
This commit is contained in:
@@ -288,7 +288,7 @@ ConfigFile::~ConfigFile()
|
|||||||
|
|
||||||
void ConfigFile::fillBuffer() {
|
void ConfigFile::fillBuffer() {
|
||||||
|
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
string tempString1("");
|
string tempString1("");
|
||||||
@@ -337,7 +337,7 @@ void ConfigFile::fillBuffer() {
|
|||||||
|
|
||||||
void ConfigFile::writeBuffer() const {
|
void ConfigFile::writeBuffer() const {
|
||||||
|
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
//write buffer to disc if enabled
|
//write buffer to disc if enabled
|
||||||
if(!noWriteAccess) {
|
if(!noWriteAccess) {
|
||||||
@@ -380,7 +380,7 @@ void ConfigFile::writeBuffer() const {
|
|||||||
|
|
||||||
void ConfigFile::updateConfig(ConfigState myConfigState) {
|
void ConfigFile::updateConfig(ConfigState myConfigState) {
|
||||||
|
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
boost::filesystem::path startPath(myArgv[0]);
|
boost::filesystem::path startPath(myArgv[0]);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
@@ -531,7 +531,7 @@ void ConfigFile::updateConfig(ConfigState myConfigState) {
|
|||||||
|
|
||||||
string ConfigFile::readConfigString(string varName) const
|
string ConfigFile::readConfigString(string varName) const
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
string tempString("");
|
string tempString("");
|
||||||
@@ -548,7 +548,7 @@ string ConfigFile::readConfigString(string varName) const
|
|||||||
|
|
||||||
int ConfigFile::readConfigInt(string varName) const
|
int ConfigFile::readConfigInt(string varName) const
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
string tempString("");
|
string tempString("");
|
||||||
@@ -570,7 +570,7 @@ int ConfigFile::readConfigInt(string varName) const
|
|||||||
|
|
||||||
list<int> ConfigFile::readConfigIntList(string varName) const
|
list<int> ConfigFile::readConfigIntList(string varName) const
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
list<string> tempStringList;
|
list<string> tempStringList;
|
||||||
@@ -602,7 +602,7 @@ list<int> ConfigFile::readConfigIntList(string varName) const
|
|||||||
|
|
||||||
void ConfigFile::writeConfigInt(string varName, int varCont)
|
void ConfigFile::writeConfigInt(string varName, int varCont)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
string tempString;
|
string tempString;
|
||||||
@@ -620,7 +620,7 @@ void ConfigFile::writeConfigInt(string varName, int varCont)
|
|||||||
|
|
||||||
void ConfigFile::writeConfigIntList(string varName, list<int> varCont)
|
void ConfigFile::writeConfigIntList(string varName, list<int> varCont)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
ostringstream intToString;
|
ostringstream intToString;
|
||||||
@@ -647,7 +647,7 @@ void ConfigFile::writeConfigIntList(string varName, list<int> varCont)
|
|||||||
|
|
||||||
void ConfigFile::writeConfigString(string varName, string varCont)
|
void ConfigFile::writeConfigString(string varName, string varCont)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_configMutex);
|
boost::recursive_mutex::scoped_lock lock(m_configMutex);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i=0; i<configBufferList.size(); i++) {
|
for (i=0; i<configBufferList.size(); i++) {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
mutable boost::mutex m_configMutex;
|
mutable boost::recursive_mutex m_configMutex;
|
||||||
|
|
||||||
struct ConfigInfo
|
struct ConfigInfo
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user