From: Michael Friedrich Date: Mon, 12 Aug 2013 09:07:48 +0000 (+0200) Subject: comments: Only send signal on removal. X-Git-Tag: v0.0.3~708 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=478e42dbde6d69ce97ae9b2f26e59d6d878908ad;p=icinga2 comments: Only send signal on removal. --- diff --git a/lib/icinga/service-comment.cpp b/lib/icinga/service-comment.cpp index 874dccaa0..d3083b025 100644 --- a/lib/icinga/service-comment.cpp +++ b/lib/icinga/service-comment.cpp @@ -277,11 +277,12 @@ void Service::RemoveCommentsByType(int type) comments->Remove(id); } + OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); + ObjectLock olock(this); Touch("comments"); } - OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); } void Service::RemoveExpiredComments(void) @@ -309,11 +310,12 @@ void Service::RemoveExpiredComments(void) comments->Remove(id); } + OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); + ObjectLock olock(this); Touch("comments"); } - OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); } void Service::CommentsExpireTimerHandler(void)