Fix macro priority.

This commit is contained in:
Gunnar Beutner 2013-09-10 10:33:15 +02:00
parent de4e2c6585
commit f260f5e73b
3 changed files with 3 additions and 3 deletions

View File

@ -41,9 +41,9 @@ Dictionary::Ptr PluginCheckTask::ScriptFunc(const Service::Ptr& service)
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 command = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd, commandObj->GetEscapeMacros());

View File

@ -39,9 +39,9 @@ void PluginEventTask::ScriptFunc(const Service::Ptr& service)
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 command = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd, commandObj->GetEscapeMacros());

View File

@ -50,10 +50,10 @@ void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification, c
std::vector<MacroResolver::Ptr> resolvers;
resolvers.push_back(user);
resolvers.push_back(notificationMacroResolver);
resolvers.push_back(commandObj);
resolvers.push_back(notification);
resolvers.push_back(service);
resolvers.push_back(service->GetHost());
resolvers.push_back(commandObj);
resolvers.push_back(IcingaApplication::GetInstance());
Value command = MacroProcessor::ResolveMacros(raw_command, resolvers, cr, Utility::EscapeShellCmd, commandObj->GetEscapeMacros());