mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
add some object locking to the Dump method (which could theoreticylly suffer from same reace condition as serializer)
This commit is contained in:
parent
91296c2a25
commit
44ac6cf1ec
1 changed files with 3 additions and 0 deletions
|
|
@ -221,6 +221,7 @@ void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include)
|
|||
void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
|
||||
{
|
||||
if (clearExisting) {
|
||||
ObjectLock olock(this);
|
||||
SetSegments(new Array());
|
||||
} else {
|
||||
if (begin < GetValidEnd())
|
||||
|
|
@ -346,6 +347,8 @@ void TimePeriod::UpdateTimerHandler()
|
|||
|
||||
void TimePeriod::Dump()
|
||||
{
|
||||
ObjectLock olock(this);
|
||||
|
||||
Array::Ptr segments = GetSegments();
|
||||
|
||||
Log(LogDebug, "TimePeriod")
|
||||
|
|
|
|||
Loading…
Reference in a new issue