MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetLastComment

Method GetLastComment

lib/icinga/checkable-comment.cpp:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52Comment::Ptr Checkable::GetLastComment() const
53{
54 std::unique_lock<std::mutex> lock (m_CommentMutex);
55 Comment::Ptr lastComment;
56
57 for (auto& comment : m_Comments) {
58 if (!lastComment || comment->GetEntryTime() > lastComment->GetEntryTime()) {
59 lastComment = comment;
60 }
61 }
62
63 return lastComment;
64}
65
66void Checkable::RegisterComment(const Comment::Ptr& comment)
67{

Callers 1

SerializeStateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected