livestatus: Fix macro priority.

This commit is contained in:
Gunnar Beutner 2013-09-10 10:37:30 +02:00
parent f260f5e73b
commit 93b3461f7c
2 changed files with 2 additions and 2 deletions

View File

@ -234,9 +234,9 @@ Value HostsTable::CheckCommandExpandedAccessor(const Value& row)
Value raw_command = commandObj->GetCommandLine(); Value raw_command = commandObj->GetCommandLine();
std::vector<MacroResolver::Ptr> resolvers; std::vector<MacroResolver::Ptr> resolvers;
resolvers.push_back(commandObj);
resolvers.push_back(hc); resolvers.push_back(hc);
resolvers.push_back(host); resolvers.push_back(host);
resolvers.push_back(commandObj);
resolvers.push_back(IcingaApplication::GetInstance()); resolvers.push_back(IcingaApplication::GetInstance());
Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd); Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd);

View File

@ -185,9 +185,9 @@ Value ServicesTable::CheckCommandExpandedAccessor(const Value& row)
Value raw_command = commandObj->GetCommandLine(); Value raw_command = commandObj->GetCommandLine();
std::vector<MacroResolver::Ptr> resolvers; std::vector<MacroResolver::Ptr> resolvers;
resolvers.push_back(commandObj);
resolvers.push_back(service); resolvers.push_back(service);
resolvers.push_back(service->GetHost()); resolvers.push_back(service->GetHost());
resolvers.push_back(commandObj);
resolvers.push_back(IcingaApplication::GetInstance()); resolvers.push_back(IcingaApplication::GetInstance());
Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd); Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd);