From 93b3461f7cd60b05a6f05492b744190c13fd092a Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 10 Sep 2013 10:37:30 +0200 Subject: [PATCH] livestatus: Fix macro priority. --- components/livestatus/hoststable.cpp | 2 +- components/livestatus/servicestable.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp index d5af3c8a3..0340d2b4b 100644 --- a/components/livestatus/hoststable.cpp +++ b/components/livestatus/hoststable.cpp @@ -234,9 +234,9 @@ Value HostsTable::CheckCommandExpandedAccessor(const Value& row) Value raw_command = commandObj->GetCommandLine(); std::vector resolvers; - resolvers.push_back(commandObj); resolvers.push_back(hc); resolvers.push_back(host); + resolvers.push_back(commandObj); resolvers.push_back(IcingaApplication::GetInstance()); Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd); diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp index 941e3a7de..ba3d4580c 100644 --- a/components/livestatus/servicestable.cpp +++ b/components/livestatus/servicestable.cpp @@ -185,9 +185,9 @@ Value ServicesTable::CheckCommandExpandedAccessor(const Value& row) Value raw_command = commandObj->GetCommandLine(); std::vector resolvers; - resolvers.push_back(commandObj); resolvers.push_back(service); resolvers.push_back(service->GetHost()); + resolvers.push_back(commandObj); resolvers.push_back(IcingaApplication::GetInstance()); Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd); -- 2.40.0