From: Gunnar Beutner Date: Tue, 10 Sep 2013 08:37:30 +0000 (+0200) Subject: livestatus: Fix macro priority. X-Git-Tag: v0.0.3~582 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93b3461f7cd60b05a6f05492b744190c13fd092a;p=icinga2 livestatus: Fix macro priority. --- 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);