]> granicus.if.org Git - icinga2/commitdiff
livestatus: Fix macro priority.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 10 Sep 2013 08:37:30 +0000 (10:37 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 10 Sep 2013 08:37:30 +0000 (10:37 +0200)
components/livestatus/hoststable.cpp
components/livestatus/servicestable.cpp

index d5af3c8a3173d998385d7181eba857b23ce33fd1..0340d2b4b20e966ab59619d7755468bd73a0e9e6 100644 (file)
@@ -234,9 +234,9 @@ Value HostsTable::CheckCommandExpandedAccessor(const Value& row)
        Value raw_command = commandObj->GetCommandLine();
 
        std::vector<MacroResolver::Ptr> 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);
index 941e3a7dea8f528efee6ecb023dd157941a3afd3..ba3d4580caa0d52752ab96007e0554c8dd23567a 100644 (file)
@@ -185,9 +185,9 @@ Value ServicesTable::CheckCommandExpandedAccessor(const Value& row)
        Value raw_command = commandObj->GetCommandLine();
 
         std::vector<MacroResolver::Ptr> 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);