From 4bc4defc97f6696d030293fe9e7ea2da0474fded Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 19 Jul 2013 16:11:35 +0200 Subject: [PATCH] livestatus: add childs attribute to hosts table refs #4372 --- components/livestatus/hoststable.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp index 8a146e3b4..50bf2a81c 100644 --- a/components/livestatus/hoststable.cpp +++ b/components/livestatus/hoststable.cpp @@ -1396,8 +1396,13 @@ Value HostsTable::ParentsAccessor(const Value& row) Value HostsTable::ChildsAccessor(const Value& row) { - /* TODO */ - return Empty; + Array::Ptr childs = boost::make_shared(); + + BOOST_FOREACH(const Host::Ptr& child, static_cast(row)->GetChildHosts()) { + childs->Add(child->GetName()); + } + + return childs; } Value HostsTable::NumServicesAccessor(const Value& row)