mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Fix crash in TimePeriod::UpdateRegion().
This commit is contained in:
parent
e683de5ab8
commit
14c837a208
@ -210,6 +210,7 @@ void TimePeriod::UpdateRegion(double begin, double end)
|
||||
ObjectLock olock(this);
|
||||
RemoveSegment(begin, end);
|
||||
|
||||
ObjectLock dlock(segments);
|
||||
BOOST_FOREACH(const Dictionary::Ptr& segment, segments) {
|
||||
AddSegment(segment);
|
||||
}
|
||||
@ -284,9 +285,9 @@ void TimePeriod::EmptyTimePeriodUpdate(const ScriptTask::Ptr& task, const vector
|
||||
if (arguments.size() < 3)
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Expected 3 arguments."));
|
||||
|
||||
TimePeriod::Ptr tp = arguments[0];
|
||||
double begin = arguments[1];
|
||||
double end = arguments[2];
|
||||
// TimePeriod::Ptr tp = arguments[0];
|
||||
// double begin = arguments[1];
|
||||
// double end = arguments[2];
|
||||
|
||||
Array::Ptr segments = boost::make_shared<Array>();
|
||||
task->FinishResult(segments);
|
||||
|
Loading…
x
Reference in New Issue
Block a user