mirror of https://github.com/Icinga/icinga2.git
Add missing locks in ApiListener::UpdateConfigDir
This commit is contained in:
parent
38deef0411
commit
5fe2536629
|
@ -72,6 +72,8 @@ bool ApiListener::UpdateConfigDir(const Dictionary::Ptr& oldConfig, const Dictio
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
ObjectLock olock(newConfig);
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, newConfig) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, newConfig) {
|
||||||
if (oldConfig->Get(kv.first) != kv.second) {
|
if (oldConfig->Get(kv.first) != kv.second) {
|
||||||
configChange = true;
|
configChange = true;
|
||||||
|
@ -87,7 +89,9 @@ bool ApiListener::UpdateConfigDir(const Dictionary::Ptr& oldConfig, const Dictio
|
||||||
fp.close();
|
fp.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectLock xlock(oldConfig);
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, oldConfig) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, oldConfig) {
|
||||||
if (!newConfig->Contains(kv.first)) {
|
if (!newConfig->Contains(kv.first)) {
|
||||||
configChange = true;
|
configChange = true;
|
||||||
|
|
Loading…
Reference in New Issue