mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-01 19:04:39 +02:00
parent
093be8b5c9
commit
f02c87b14c
@ -196,17 +196,13 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
|
|||||||
|
|
||||||
Array::Ptr command_arr = command;
|
Array::Ptr command_arr = command;
|
||||||
BOOST_FOREACH(const CommandArgument& arg, args) {
|
BOOST_FOREACH(const CommandArgument& arg, args) {
|
||||||
Array::Ptr arr;
|
|
||||||
|
|
||||||
if (arg.AValue.IsString())
|
if (arg.AValue.IsObjectType<Dictionary>()) {
|
||||||
AddArgumentHelper(command_arr, arg.Key, arg.AValue, !arg.SkipKey, !arg.SkipValue);
|
Log(LogWarning, "PluginUtility", "Tried to use dictionary in argument");
|
||||||
else if (arg.AValue.IsObjectType<Array>())
|
|
||||||
arr = static_cast<Array::Ptr>(arg.AValue);
|
|
||||||
else
|
|
||||||
continue;
|
continue;
|
||||||
|
} else if (arg.AValue.IsObjectType<Array>()) {
|
||||||
if (arr) {
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
Array::Ptr arr = static_cast<Array::Ptr>(arg.AValue);
|
||||||
|
|
||||||
ObjectLock olock(arr);
|
ObjectLock olock(arr);
|
||||||
BOOST_FOREACH(const Value& value, arr) {
|
BOOST_FOREACH(const Value& value, arr) {
|
||||||
@ -218,10 +214,10 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
|
|||||||
} else
|
} else
|
||||||
add_key = !arg.SkipKey && arg.RepeatKey;
|
add_key = !arg.SkipKey && arg.RepeatKey;
|
||||||
|
|
||||||
|
|
||||||
AddArgumentHelper(command_arr, arg.Key, value, add_key, !arg.SkipValue);
|
AddArgumentHelper(command_arr, arg.Key, value, add_key, !arg.SkipValue);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
AddArgumentHelper(command_arr, arg.Key, arg.AValue, !arg.SkipKey, !arg.SkipValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user