"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/icinga/checkable-comment.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

checkable-comment.cpp  (icinga2-2.11.5):checkable-comment.cpp  (icinga2-2.12.0)
skipping to change at line 20 skipping to change at line 20
using namespace icinga; using namespace icinga;
void Checkable::RemoveAllComments() void Checkable::RemoveAllComments()
{ {
for (const Comment::Ptr& comment : GetComments()) { for (const Comment::Ptr& comment : GetComments()) {
Comment::RemoveComment(comment->GetName()); Comment::RemoveComment(comment->GetName());
} }
} }
void Checkable::RemoveCommentsByType(int type) void Checkable::RemoveCommentsByType(int type, const String& removedBy)
{ {
for (const Comment::Ptr& comment : GetComments()) { for (const Comment::Ptr& comment : GetComments()) {
/* Do not remove persistent comments from an acknowledgement */ /* Do not remove persistent comments from an acknowledgement */
if (comment->GetEntryType() == CommentAcknowledgement && comment- >GetPersistent()) if (comment->GetEntryType() == CommentAcknowledgement && comment- >GetPersistent())
continue; continue;
if (comment->GetEntryType() == type) if (comment->GetEntryType() == type) {
{
ObjectLock oLock (comment);
comment->SetRemovedBy(removedBy);
}
Comment::RemoveComment(comment->GetName()); Comment::RemoveComment(comment->GetName());
}
} }
} }
std::set<Comment::Ptr> Checkable::GetComments() const std::set<Comment::Ptr> Checkable::GetComments() const
{ {
boost::mutex::scoped_lock lock(m_CommentMutex); boost::mutex::scoped_lock lock(m_CommentMutex);
return m_Comments; return m_Comments;
} }
void Checkable::RegisterComment(const Comment::Ptr& comment) void Checkable::RegisterComment(const Comment::Ptr& comment)
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)