mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Merge pull request #8226 from Icinga/bugfix/downtime-checkable-getname
Check !!downtime->GetCheckable() before downtime->GetCheckable()->GetName()
This commit is contained in:
commit
b5123e3c25
@ -345,10 +345,19 @@ void Downtime::RemoveDowntime(const String& id, bool cancelled, bool expired, co
|
|||||||
reason = "<unknown>";
|
reason = "<unknown>";
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LogInformation, "Downtime")
|
Log msg (LogInformation, "Downtime");
|
||||||
<< "Removed downtime '" << downtime->GetName() << "' from checkable '"
|
|
||||||
<< downtime->GetCheckable()->GetName() << "' (Reason: " << reason << ").";
|
|
||||||
|
|
||||||
|
msg << "Removed downtime '" << downtime->GetName() << "' from checkable";
|
||||||
|
|
||||||
|
{
|
||||||
|
auto checkable (downtime->GetCheckable());
|
||||||
|
|
||||||
|
if (checkable) {
|
||||||
|
msg << " '" << checkable->GetName() << "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
msg << " (Reason: " << reason << ").";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Downtime::CanBeTriggered()
|
bool Downtime::CanBeTriggered()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user