Fix $ido_name$ macro when using the IDO check type with command_endpoint

fixes #12428
This commit is contained in:
Gunnar Beutner 2016-08-14 19:27:35 +02:00
parent 4a3b33e3f5
commit c6e5f3dcb8
1 changed files with 3 additions and 6 deletions

View File

@ -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);