mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-16 18:24:31 +02:00
Cleaned up configrpc.
This commit is contained in:
parent
51b3fe14e7
commit
f7f8edb875
@ -85,14 +85,8 @@ JsonRpcRequest ConfigRpcComponent::MakeObjectMessage(const ConfigObject::Ptr& ob
|
|||||||
params.GetDictionary()->SetPropertyString("name", object->GetName());
|
params.GetDictionary()->SetPropertyString("name", object->GetName());
|
||||||
params.GetDictionary()->SetPropertyString("type", object->GetType());
|
params.GetDictionary()->SetPropertyString("type", object->GetType());
|
||||||
|
|
||||||
if (includeProperties) {
|
if (includeProperties)
|
||||||
Message properties;
|
params.SetPropertyMessage("properties", Message(object));
|
||||||
params.GetDictionary()->SetPropertyDictionary("properties", properties.GetDictionary());
|
|
||||||
|
|
||||||
for (ConfigObject::ParameterIterator pi = object->Properties.begin(); pi != object->Properties.end(); pi++) {
|
|
||||||
properties.GetDictionary()->SetPropertyString(pi->first, pi->second);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
@ -101,7 +95,7 @@ bool ConfigRpcComponent::ShouldReplicateObject(const ConfigObject::Ptr& object)
|
|||||||
{
|
{
|
||||||
long replicate;
|
long replicate;
|
||||||
if (!object->GetPropertyInteger("replicate", &replicate))
|
if (!object->GetPropertyInteger("replicate", &replicate))
|
||||||
return false;
|
return true;
|
||||||
return (replicate != 0);
|
return (replicate != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user