From: Johannes Meyer Date: Mon, 16 Dec 2013 14:36:38 +0000 (+0100) Subject: Fix aggregation of the type and is_service livestatus comment columns X-Git-Tag: v0.0.6~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3aa21fb340e004ec3d64609415d9494d8cee9881;p=icinga2 Fix aggregation of the type and is_service livestatus comment columns refs #5332 --- diff --git a/components/livestatus/commentstable.cpp b/components/livestatus/commentstable.cpp index c77ea587d..3b36805a9 100644 --- a/components/livestatus/commentstable.cpp +++ b/components/livestatus/commentstable.cpp @@ -119,7 +119,8 @@ Value CommentsTable::EntryTimeAccessor(const Value& row) Value CommentsTable::TypeAccessor(const Value& row) { - Service::Ptr svc = Service::GetOwnerByCommentID(row); + Comment::Ptr comment = static_cast(row); + Service::Ptr svc = Service::GetOwnerByCommentID(comment->GetId()); if (!svc) return Empty; @@ -129,7 +130,8 @@ Value CommentsTable::TypeAccessor(const Value& row) Value CommentsTable::IsServiceAccessor(const Value& row) { - Service::Ptr svc = Service::GetOwnerByCommentID(row); + Comment::Ptr comment = static_cast(row); + Service::Ptr svc = Service::GetOwnerByCommentID(comment->GetId()); if (!svc) return Empty;