From c6e5f3dcb81d39f6b91babb7e91afd9bfc6e8ffb Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 14 Aug 2016 19:27:35 +0200 Subject: [PATCH] Fix $ido_name$ macro when using the IDO check type with command_endpoint fixes #12428 --- lib/db_ido/idochecktask.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/db_ido/idochecktask.cpp b/lib/db_ido/idochecktask.cpp index bcab7aa89..049928e4f 100644 --- a/lib/db_ido/idochecktask.cpp +++ b/lib/db_ido/idochecktask.cpp @@ -55,6 +55,9 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult String idoType = MacroProcessor::ResolveMacros("$ido_type$", resolvers, checkable->GetLastCheckResult(), NULL, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros); + String idoName = MacroProcessor::ResolveMacros("$ido_name$", resolvers, checkable->GetLastCheckResult(), + NULL, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros); + if (resolvedMacros && !useResolvedMacros) return; @@ -65,12 +68,6 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult return; } - String idoName = MacroProcessor::ResolveMacros("$ido_name$", resolvers, checkable->GetLastCheckResult(), - NULL, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros); - - if (resolvedMacros && !useResolvedMacros) - return; - if (idoName.IsEmpty()) { cr->SetOutput("Macro 'ido_name' must be set."); cr->SetState(ServiceUnknown);