DummyCheckTask::ScriptFunc(): take CheckResultProducer::Ptr

This commit is contained in:
Alexander A. Klimov 2025-04-02 13:18:20 +02:00
parent bb4a9d1192
commit ca02291795
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, DummyCheck, &DummyCheckTask::ScriptFunc, "checkable:cr:resolvedMacros:useResolvedMacros"); REGISTER_FUNCTION_NONCONST(Internal, DummyCheck, &DummyCheckTask::ScriptFunc, "checkable:cr:producer:resolvedMacros:useResolvedMacros");
void DummyCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, void DummyCheckTask::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);
@ -70,6 +70,6 @@ void DummyCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResu
cr->SetExecutionEnd(now); cr->SetExecutionEnd(now);
cr->SetCommand(commandName); cr->SetCommand(commandName);
checkable->ProcessCheckResult(cr); checkable->ProcessCheckResult(cr, producer);
} }
} }

View File

@ -19,7 +19,7 @@ class DummyCheckTask
{ {
public: public:
static void ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, static void 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);
private: private:
DummyCheckTask(); DummyCheckTask();