NullCheckTask::ScriptFunc(): take CheckResultProducer::Ptr

This commit is contained in:
Alexander A. Klimov 2025-04-02 13:21:26 +02:00
parent 8c1c38cf3e
commit fca4b185c1
2 changed files with 4 additions and 4 deletions

View File

@ -13,10 +13,10 @@
using namespace icinga; using namespace icinga;
REGISTER_FUNCTION_NONCONST(Internal, NullCheck, &NullCheckTask::ScriptFunc, "checkable:cr:resolvedMacros:useResolvedMacros"); REGISTER_FUNCTION_NONCONST(Internal, NullCheck, &NullCheckTask::ScriptFunc, "checkable:cr:producer:resolvedMacros:useResolvedMacros");
void NullCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, void NullCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros) const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
{ {
REQUIRE_NOT_NULL(checkable); REQUIRE_NOT_NULL(checkable);
REQUIRE_NOT_NULL(cr); REQUIRE_NOT_NULL(cr);
@ -45,6 +45,6 @@ void NullCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResul
})); }));
cr->SetState(state); cr->SetState(state);
checkable->ProcessCheckResult(cr); checkable->ProcessCheckResult(cr, producer);
} }
} }

View File

@ -19,7 +19,7 @@ class NullCheckTask
{ {
public: public:
static void ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr, static void ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros); const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
private: private:
NullCheckTask(); NullCheckTask();